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 reeuv <ra...@gmail.com> on 2012/01/04 13:27:39 UTC

Checking which terms are already available in the index from a list of terms

I have a list of terms that I want to check which of them are already
available in the index

for e.g I have a <field name="word" type="string" index="true" store="true">
which indexes the terms.

And I have list of words e.g. Honda, Civic, 2001. 

I want to check which of these terms are already available in the index. Is
there any good efficient way of doing it rather than sending request one by
one for the word Honda, Civic and 2001 ?

Thanks.

--
View this message in context: http://lucene.472066.n3.nabble.com/Checking-which-terms-are-already-available-in-the-index-from-a-list-of-terms-tp3631699p3631699.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Checking which terms are already available in the index from a list of terms

Posted by lukai <lu...@gmail.com>.
There is some operator whose name is *OR*.

Thanks,

On 1/4/12, reeuv <ra...@gmail.com> wrote:
> I have a list of terms that I want to check which of them are already
> available in the index
>
> for e.g I have a <field name="word" type="string" index="true" store="true">
> which indexes the terms.
>
> And I have list of words e.g. Honda, Civic, 2001.
>
> I want to check which of these terms are already available in the index. Is
> there any good efficient way of doing it rather than sending request one by
> one for the word Honda, Civic and 2001 ?
>
> Thanks.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Checking-which-terms-are-already-available-in-the-index-from-a-list-of-terms-tp3631699p3631699.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Checking which terms are already available in the index from a list of terms

Posted by reeuv <ra...@gmail.com>.
Thanks Hoss for the valuable advice.

--
View this message in context: http://lucene.472066.n3.nabble.com/Checking-which-terms-are-already-available-in-the-index-from-a-list-of-terms-tp3631699p3633226.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Checking which terms are already available in the index from a list of terms

Posted by Chris Hostetter <ho...@fucit.org>.
: I have a list of terms that I want to check which of them are already
: available in the index
: 
: for e.g I have a <field name="word" type="string" index="true" store="true">
: which indexes the terms.
: 
: And I have list of words e.g. Honda, Civic, 2001. 

if the list you have is small relative hte total number of terms in the 
index, i would suggest facet.query...

  q=*:*&facet=true&facet.query={!term f=word}Honda&facet.query={!term f=word}Civic&...

...if the total number of terms in the index is small relateive the number 
of terms you want to check, then i would suggest using facet.field and 
comparing the results on the client...

  q=*:*&facet=true&facet.field=word&facet.limit=-1


-Hoss