FAQ
Hi ,

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 .

Also

Can we use subset of documents , for
searching .

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.

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

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

regards,

Suman

Search Discussions

  • Ian Lea at Jul 15, 2010 at 10:29 am
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedJul 14, '10 at 1:23p
activeJul 15, '10 at 10:29a
posts2
users2
websitelucene.apache.org

2 users in discussion

Ian Lea: 1 post Suman Holani: 1 post

People

Translate

site design / logo © 2022 Grokbase