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 

solr field parameter

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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -