lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: subset query :query filter or boolean query
Date Thu, 15 Jul 2010 10:27:20 GMT
Loads of questions ... some answers below.

> I have 4 query search fields.
>
> case 1 : if i use one search
> field to make a query filter and then use the query filter to search on
> other 3 fields so as to reduce the searching docs subset.
>
> case 2: i use
> all query parameters using boolean query , whole of index will be searched.
>
>
> Which of the two approach will give better performance.Or is there ne
> other approach to do this .

The filter approach is likely to be best if you can reuse the filter.

> Also
>
> Can we use subset of documents , for
> searching .

Yes.

> Lets say I have hash map of
>
> P1 -1,2,3,4
>
> P2 - 3,4,5
>
>
> P3-7,5,3
>
> Now I have an documents in lucene index stored as
>
> 1-P1
>
>
> 2-P1
>
> 3-P1,P2,P3
>
> 4-P1,P2
>
> 5-P2,P3
>
> 7-P3
>
> ..
>
> ..
>
> when i search
> docs with P2 I get 3,4,5
>
> Now I want my search to b restricted to just
> 3,4,5 doc only. where by I can search only these docs for further
> parameters.
>
> 1. How to go abt it.

Boolean query with multiple nested queries.

> 2. Is there any other seraching
> mechanism I should use, or Lucene is better fit?

Lucene.

> 3. should i keep my hash
> map also in lucene indexes and is then thr a method to link it to another
> lucene indexes.

You can store whatever you want in lucene, and it can make sense to do
so, but if the data is already stored elsewhere and easily accessible
you may choose not to.  It would be up to you to provide any linkage.


--
Ian.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message