lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Imbeault <>
Subject Re: Sentence level searching
Date Mon, 13 Nov 2006 03:28:07 GMT
Hello everyone,
> Solr puts a configurable gap between values of the same field, so you
> could index every sentence as a separate value of a multi-valued
> field.
Thanks for the answer Yonik; I forgot about Multivalued fields! I'm not 
exactly sure of how to add multiple values to a single field (aside from 
fieldcopy). The code I'm thinking of using :

                        PHP code to build the XML

                        (loop for each sentence)
                        $abstract_element = $dom->createElement('field');
                        $abstract_element->setAttribute('name', 'abstract');
                        $abstract_text = 
                        (end loop)

Field in schema.xml : <field name ="abstract" type="text" indexed="true" 
stored="false" multivalued="true" />

Where am I supposed to configure the value of the gap? 
positionIncrementGap in the fieldtype definition is my guess, but I'm 
not sure. Also, am I supposed to put multivalued in the fieldtype 
definition? Alternatively, could I put positionIncrementGap in the 
<field> that I posted just above?

Thanks for the help,


View raw message