I have an index with "name" and "description" filed. I am running a Boolean
query against my index. Sometimes the term is present in both name and
description fields, in this case the documents in which both the name and
description contains the search term are scored higher compared to the ones
having either the name or the description having the search term. What I
want is to score them equal. So the the documents with either name or
description having the term has the same score as the document having the
search term present in both name and description. Is it possible? Here is
the example:
If the user search for term "xyz" I want all three documents above to have
the same score. As all documents contains the term "xyz" either in name or
in description or in both fields.
Getting the score to be exactly the same will be difficult. First of all,
if your description field is variable between documents, then the field
norm will have a different value.
A few things to try out. Omit term frequencies and norms for all the fields
used in the query. Then set disableCoord on the bool query to true so that
one clause is not score higher than the other.
I have an index with "name" and "description" filed. I am running a
Boolean query against my index. Sometimes the term is present in both name
and description fields, in this case the documents in which both the name
and description contains the search term are scored higher compared to the
ones having either the name or the description having the search term. What
I want is to score them equal. So the the documents with either name or
description having the term has the same score as the document having the
search term present in both name and description. Is it possible? Here is
the example:
If the user search for term "xyz" I want all three documents above to have
the same score. As all documents contains the term "xyz" either in name or
in description or in both fields.
Le 15 mai 2013 à 08:17, Ivan Brusic ivan@brusic.com a écrit :
Getting the score to be exactly the same will be difficult. First of all, if your description field is variable between documents, then the field norm will have a different value.
A few things to try out. Omit term frequencies and norms for all the fields used in the query. Then set disableCoord on the bool query to true so that one clause is not score higher than the other.
--
Ivan
On Tue, May 14, 2013 at 10:35 AM, Amit Patel avpatel.257@gmail.com wrote:
I have an index with "name" and "description" filed. I am running a Boolean query against my index. Sometimes the term is present in both name and description fields, in this case the documents in which both the name and description contains the search term are scored higher compared to the ones having either the name or the description having the search term. What I want is to score them equal. So the the documents with either name or description having the term has the same score as the document having the search term present in both name and description. Is it possible? Here is the example:
If the user search for term "xyz" I want all three documents above to have the same score. As all documents contains the term "xyz" either in name or in description or in both fields.
Le 15 mai 2013 à 08:17, Ivan Brusic ivan@brusic.com a écrit :
Getting the score to be exactly the same will be difficult. First of all,
if your description field is variable between documents, then the field
norm will have a different value.
A few things to try out. Omit term frequencies and norms for all the
fields used in the query. Then set disableCoord on the bool query to true
so that one clause is not score higher than the other.
I have an index with "name" and "description" filed. I am running a
Boolean query against my index. Sometimes the term is present in both name
and description fields, in this case the documents in which both the name
and description contains the search term are scored higher compared to the
ones having either the name or the description having the search term. What
I want is to score them equal. So the the documents with either name or
description having the term has the same score as the document having the
search term present in both name and description. Is it possible? Here is
the example:
If the user search for term "xyz" I want all three documents above to
have the same score. As all documents contains the term "xyz" either in
name or in description or in both fields.
Le 15 mai 2013 à 08:17, Ivan Brusic ivan@brusic.com a écrit :
Getting the score to be exactly the same will be difficult. First of all,
if your description field is variable between documents, then the field
norm will have a different value.
A few things to try out. Omit term frequencies and norms for all the
fields used in the query. Then set disableCoord on the bool query to true
so that one clause is not score higher than the other.
I have an index with "name" and "description" filed. I am running a
Boolean query against my index. Sometimes the term is present in both name
and description fields, in this case the documents in which both the name
and description contains the search term are scored higher compared to the
ones having either the name or the description having the search term. What
I want is to score them equal. So the the documents with either name or
description having the term has the same score as the document having the
search term present in both name and description. Is it possible? Here is
the example:
If the user search for term "xyz" I want all three documents above to
have the same score. As all documents contains the term "xyz" either in
name or in description or in both fields.
Le 15 mai 2013 à 08:17, Ivan Brusic ivan@brusic.com a écrit :
Getting the score to be exactly the same will be difficult. First of
all, if your description field is variable between documents, then the
field norm will have a different value.
A few things to try out. Omit term frequencies and norms for all the
fields used in the query. Then set disableCoord on the bool query to true
so that one clause is not score higher than the other.
I have an index with "name" and "description" filed. I am running a
Boolean query against my index. Sometimes the term is present in both name
and description fields, in this case the documents in which both the name
and description contains the search term are scored higher compared to the
ones having either the name or the description having the search term. What
I want is to score them equal. So the the documents with either name or
description having the term has the same score as the document having the
search term present in both name and description. Is it possible? Here is
the example:
If the user search for term "xyz" I want all three documents above to
have the same score. As all documents contains the term "xyz" either in
name or in description or in both fields.
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.