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 =
$dom->createTextNode($array['abstract']);
$abstract_element->appendChild($abstract_text);
(end loop)
$doc->appendChild($abstract_element);
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,
Michael