Answer the question
In order to leave comments, you need to log in
How to implement a multi-value field in Sphinx?
There is an index which is formed through xmlpipe. His docs have a full text field that should collect multiple values. Each value is one word.
Currently the data source looks like this:
<sphinx:docset>
<sphinx:schema>
<sphinx:field name="words"/>
</sphinx:schema>
<sphinx:document id="1">
<words>слово1 слово2 слово3</words>
</sphinx:document>
...
</sphinx:docset>
слово1 слово2 слово3
. If we are looking for слово1
, then Sphinx will assume that the query does not exactly match the value of the field. Accordingly, the position of such a document in terms of relevance will be lower than that of a document with a field of one word: слово1
. <sphinx:docset>
<sphinx:schema>
<sphinx:field name="words"/>
</sphinx:schema>
<sphinx:document id="1">
<words>слово1</words>
<words>слово2</words>
<words>слово3</words>
</sphinx:document>
...
</sphinx:docset>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question