I have an application which currently uses a boolean query. The query could
have a large number of boolean terms. I know that the TermsQuery doesn't
have the same limitations as the boolean query. However I need to maintain
the order of the original terms.

The query terms from the boolean query are actually values returned by a
chemical structure search, which are returned in order of their relevancy
in the structure search. I maintain the order by giving them a boost which
is a function of the relevancy from the structure search.

structure_id:(12345^800 OR 12356^750 OR abcde^600 ...

This approach gives me the results in the order I need them in. I'd love to
use the TermsQuery instead as it doesn't have the same limitations.

Can I boost the Terms in the terms query? Is there a way to order the
results? e.g. would the results be returned in the same order I specified
the terms?

Thanks,

-- 


This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient, 
you must not copy this message or attachment or disclose the contents to 
any other person. If you have received this transmission in error, please 
notify the sender immediately and delete the message and any attachment 
from your system. Merck KGaA, Darmstadt, Germany and any of its 
subsidiaries do not accept liability for any omissions or errors in this 
message which may arise as a result of E-Mail-transmission or for damages 
resulting from any unauthorized changes of the content of this message and 
any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its 
subsidiaries do not guarantee that this message is free of viruses and does 
not accept liability for any damages caused by any virus transmitted 
therewith.

Click http://www.emdgroup.com/disclaimer to access the German, French, 
Spanish and Portuguese versions of this disclaimer.

Reply via email to