lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trilok Prithvi <trilok.prit...@gmail.com>
Subject Key/Value Query
Date Fri, 30 Jan 2015 00:46:20 GMT
Hi,

I need your help on the following query:

*Indexed data (field name is 'text'):*
*------------------------------------------------*
*I'm also a cat*
*I'm pig*
*I'm a cat*
*I'm a hero*
*I'm a superman*
*I'm dog*

I want to query for *text:(i'm cat) OR text:(i'm dog) OR text:(i'm god)*

And I would like to get the result set as follows in a *single query*:
*i'm cat  => I'm a cat*
*i'm dog => I'm dog*
*i'm god => <null or empty string>*

Currently, I'm firing 3 individual queries, each one for "i'm dog", "i'm
cat", "i'm god" with rows=1 to get the best result on the top and
programatically, building the result set.

Question is, how do we fire this in one query (to make it faster, than
making multiple calls) and get the result in a similar format? If the
question is vague, please let me know and I would be happy to clarify.

Thanks
Trilok

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message