You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Rahul <ra...@gmail.com> on 2014/10/16 16:13:11 UTC
Boost on basis of field is present or not in found documents
Where should i do changes in config files if i want to boost on the basis
of if a field is present in my found documents.
Explanation:
I have documents with fields name, address, id, number, where number may or
may not exists.
I have to rank the documents higher based on if number is not present.
I thought of writing function exists in my qf but that is not working.
I am using edismax query parser.
Thanks
--
Rahul Ranjan
Re: Boost on basis of field is present or not in found documents
Posted by Ahmet Arslan <io...@yahoo.com.INVALID>.
Hi,
Can't you mix not, exists, if functions? https://cwiki.apache.org/confluence/display/solr/Function+Queries
boost=if(not(exists(number)),1,100)
On Thursday, October 16, 2014 5:13 PM, Rahul <ra...@gmail.com> wrote:
Where should i do changes in config files if i want to boost on the basis
of if a field is present in my found documents.
Explanation:
I have documents with fields name, address, id, number, where number may or
may not exists.
I have to rank the documents higher based on if number is not present.
I thought of writing function exists in my qf but that is not working.
I am using edismax query parser.
Thanks
--
Rahul Ranjan