I build an index containing documents from different types : user, space,
content etc....The type is a field of the index.
First question
Is that possible to configure to index to get a better score if a query
match an object of a given type ?
Example : if I search 'Doe' on document titles, the user 'John Doe' should
have a better score that a blog entry named 'Jonh Doe was the first man to
land on the moon'.
Second question
If the scoring 'by type' is not possible, do ES enable us to give a better
score depending on the word distribution.
Example : if I search 'Doe' on document titles, the document 'John Doe'
should be more pertinent than the document 'Jonh Doe was the first man to
land on the moon' because for the first one, the search term represents 50%
of the words.
Hi,
of course you are clear.
There is differents solutions to achieve what you want to do :
If you want to boost your document on certains fields you can use the
boost argument inside your term query
I build an index containing documents from different types : user, space,
content etc....The type is a field of the index.
First question
Is that possible to configure to index to get a better score if a query
match an object of a given type ?
Example : if I search 'Doe' on document titles, the user 'John Doe' should
have a better score that a blog entry named 'Jonh Doe was the first man to
land on the moon'.
Second question
If the scoring 'by type' is not possible, do ES enable us to give a better
score depending on the word distribution.
Example : if I search 'Doe' on document titles, the document 'John Doe'
should be more pertinent than the document 'Jonh Doe was the first man to
land on the moon' because for the first one, the search term represents 50%
of the words.
I build an index containing documents from different types : user, space,
content etc....The type is a field of the index.
First question
Is that possible to configure to index to get a better score if a query
match an object of a given type ?
Example : if I search 'Doe' on document titles, the user 'John Doe' should
have a better score that a blog entry named 'Jonh Doe was the first man to
land on the moon'.
Second question
If the scoring 'by type' is not possible, do ES enable us to give a better
score depending on the word distribution.
Example : if I search 'Doe' on document titles, the document 'John Doe'
should be more pertinent than the document 'Jonh Doe was the first man to
land on the moon' because for the first one, the search term represents 50%
of the words.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.