solr4 - Retrieving only highlighted solr field and not the whole content -
i wanted index pdf, word documents using solr. whole content of word / pdf document coming in search response , highlighted fragment. content quite long , wanted avoid in search response because of content length.
is possible highlighted fragment of content field ?
here search query
http://localhost:8080/solr4x/collection1/select?q=scripting&wt=xml&hl=true&hl.fl=content
here schema
<field name="content" type="text_general" indexed="false" stored="true"multivalued="true"/>
<field name="text" type="text_general" indexed="true" stored="false" multivalued="true"/>
<copyfield source="content" dest="text"/>
i using solr 4.3
you can specify in request url fields want returned:
http://localhost:8080/solr4x/collection1/select?q=scripting&wt=xml&hl=true&hl.fl=content&fl=text
or not store content field (although not sure usefulness of field neither stored nor indexed):
<field name="content" type="text_general" indexed="false" stored="false" multivalued="true"/>
Comments
Post a Comment