lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KK <>
Subject Re: Using IN to retrieve data after lucene search.
Date Thu, 09 Jul 2009 06:15:23 GMT
store a field only if you want to retrieve the corresponding values i.e you
want them to be part of the search result, if you just want to use them to
search and you are not bothered about pulling the matched data out of the
index, there is no need to putting extra burden by storing them as well, in
this case indexing is enough,
as per your requirement I think just indexing is good you are
pulling the data from db...have a look here,

for a all other details related to Lucene indexing you might go thru this as


On Thu, Jul 9, 2009 at 10:52 AM, Aditya R <> wrote:

> Hi all,
> I am new to lucene. In my sample application I have used lucene to index my
> 17 field db table. I have stored only the primary key of the table in
> lucene
> index and indexed other 16 fields, without storing them. The primary keys
> of
> the searched keyword is then retrieved. The primary key string is then
> queried in the database like this
>  'String quer="from Doctors where id IN "+primaryKeys;'  , where
> 'primaryKeys' will be something like this (23,32,44,56).
> Is this the right way to use lucene? Or do you suggest me to store all the
> fields in the lucene index and retrieve them.
> Thanks,
> Aditya
> --
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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