How to find the fields that are indexed?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to find the fields that are indexed?

DHIVYA M
Sir,
 
Am using lucene 2.3.2. I would like to know what are the fields that are been indexed?
 
Ex:
 
doc.get("path");
 
this statement returns the path of the document
 
like "path" what are the other fields of the document used by lucene
 
I went through converting all the class files to java files and read all the files. But i got confused with the things available in cluster.
 
So, Can anyone tell me how to find it out?
 
 
Thanks in advance,
Dhivya


      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
Reply | Threaded
Open this post in threaded view
|

Re: How to find the fields that are indexed?

Ian Lea
Lucene will index and store the fields that you tell it to when a
document is written to the index.

In lucene 2.4 doc.getFields() returns a List of all the fields in a
document and probably in 2.3.2 as well.  See the javadoc.  That will
tell you the fields that have been stored but I think not necessarily
those that have been indexed i.e. made searchable.

Luke can tell you pretty much everything about an index.


--
Ian.


On Mon, Nov 23, 2009 at 9:42 AM, DHIVYA M <[hidden email]> wrote:

> Sir,
>
> Am using lucene 2.3.2. I would like to know what are the fields that are been indexed?
>
> Ex:
>
> doc.get("path");
>
> this statement returns the path of the document
>
> like "path" what are the other fields of the document used by lucene
>
> I went through converting all the class files to java files and read all the files. But i got confused with the things available in cluster.
>
> So, Can anyone tell me how to find it out?
>
>
> Thanks in advance,
> Dhivya

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to find the fields that are indexed?

Shashi Kant-2
In reply to this post by DHIVYA M
Use this tool to examine the index: http://www.getopt.org/luke/

I would also suggest getting hold of a Lucene book such as Lucene In Action
(http://www.manning.com/hatcher2/) to get familiar with the basics of
Lucene.



On Mon, Nov 23, 2009 at 4:42 AM, DHIVYA M <[hidden email]>wrote:

> Sir,
>
> Am using lucene 2.3.2. I would like to know what are the fields that are
> been indexed?
>
> Ex:
>
> doc.get("path");
>
> this statement returns the path of the document
>
> like "path" what are the other fields of the document used by lucene
>
> I went through converting all the class files to java files and read all
> the files. But i got confused with the things available in cluster.
>
> So, Can anyone tell me how to find it out?
>
>
> Thanks in advance,
> Dhivya
>
>
>      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
> http://in.yahoo.com/
Reply | Threaded
Open this post in threaded view
|

Re: How to find the fields that are indexed?

DHIVYA M
In reply to this post by Ian Lea
That was a good solution to my problem and i found my fields for the document.
Acutally i was trying it to find out how to implement autosuggest with lucene.
Can you suggest me an idea of how to use autosuggest wih lucene.
 
Thanks in advance,
Dhivya

--- On Mon, 23/11/09, Ian Lea <[hidden email]> wrote:


From: Ian Lea <[hidden email]>
Subject: Re: How to find the fields that are indexed?
To: [hidden email]
Date: Monday, 23 November, 2009, 10:08 AM


Lucene will index and store the fields that you tell it to when a
document is written to the index.

In lucene 2.4 doc.getFields() returns a List of all the fields in a
document and probably in 2.3.2 as well.  See the javadoc.  That will
tell you the fields that have been stored but I think not necessarily
those that have been indexed i.e. made searchable.

Luke can tell you pretty much everything about an index.


--
Ian.


On Mon, Nov 23, 2009 at 9:42 AM, DHIVYA M <[hidden email]> wrote:

> Sir,
>
> Am using lucene 2.3.2. I would like to know what are the fields that are been indexed?
>
> Ex:
>
> doc.get("path");
>
> this statement returns the path of the document
>
> like "path" what are the other fields of the document used by lucene
>
> I went through converting all the class files to java files and read all the files. But i got confused with the things available in cluster.
>
> So, Can anyone tell me how to find it out?
>
>
> Thanks in advance,
> Dhivya

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
Reply | Threaded
Open this post in threaded view
|

Re: How to find the fields that are indexed?

Ian Lea
> That was a good solution to my problem and i found my fields for the document.

Good.

> Acutally i was trying it to find out how to implement autosuggest with lucene.
> Can you suggest me an idea of how to use autosuggest wih lucene.

There was something about it recently on this list.  Take a look in
the archives.  Or just google "lucene suggestions" or similar.


--
Ian.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to find the fields that are indexed?

Anshum-2
In reply to this post by DHIVYA M
By autosuggest, would you mean similar documents?
In that case you could try the lucene 'morelikethis' class.

--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Mon, Nov 23, 2009 at 3:42 PM, DHIVYA M <[hidden email]>wrote:

> That was a good solution to my problem and i found my fields for the
> document.
> Acutally i was trying it to find out how to implement autosuggest with
> lucene.
> Can you suggest me an idea of how to use autosuggest wih lucene.
>
> Thanks in advance,
> Dhivya
>
> --- On Mon, 23/11/09, Ian Lea <[hidden email]> wrote:
>
>
> From: Ian Lea <[hidden email]>
> Subject: Re: How to find the fields that are indexed?
> To: [hidden email]
> Date: Monday, 23 November, 2009, 10:08 AM
>
>
> Lucene will index and store the fields that you tell it to when a
> document is written to the index.
>
> In lucene 2.4 doc.getFields() returns a List of all the fields in a
> document and probably in 2.3.2 as well.  See the javadoc.  That will
> tell you the fields that have been stored but I think not necessarily
> those that have been indexed i.e. made searchable.
>
> Luke can tell you pretty much everything about an index.
>
>
> --
> Ian.
>
>
> On Mon, Nov 23, 2009 at 9:42 AM, DHIVYA M <[hidden email]>
> wrote:
> > Sir,
> >
> > Am using lucene 2.3.2. I would like to know what are the fields that are
> been indexed?
> >
> > Ex:
> >
> > doc.get("path");
> >
> > this statement returns the path of the document
> >
> > like "path" what are the other fields of the document used by lucene
> >
> > I went through converting all the class files to java files and read all
> the files. But i got confused with the things available in cluster.
> >
> > So, Can anyone tell me how to find it out?
> >
> >
> > Thanks in advance,
> > Dhivya
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
>
>       The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
> http://in.yahoo.com/
>
Reply | Threaded
Open this post in threaded view
|

autosuggest - in the sense of autocomplete

DHIVYA M
Sir,
 
I actually meant auto suggest as such available for google suggest similar to autocomplete.
Where, users need not type the entire text and instead can go with the suggestions available.
 
Thanks in advance,
Dhivya

--- On Mon, 23/11/09, Anshum <[hidden email]> wrote:


From: Anshum <[hidden email]>
Subject: Re: How to find the fields that are indexed?
To: [hidden email]
Date: Monday, 23 November, 2009, 10:35 AM


By autosuggest, would you mean similar documents?
In that case you could try the lucene 'morelikethis' class.

--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Mon, Nov 23, 2009 at 3:42 PM, DHIVYA M <[hidden email]>wrote:

> That was a good solution to my problem and i found my fields for the
> document.
> Acutally i was trying it to find out how to implement autosuggest with
> lucene.
> Can you suggest me an idea of how to use autosuggest wih lucene.
>
> Thanks in advance,
> Dhivya
>
> --- On Mon, 23/11/09, Ian Lea <[hidden email]> wrote:
>
>
> From: Ian Lea <[hidden email]>
> Subject: Re: How to find the fields that are indexed?
> To: [hidden email]
> Date: Monday, 23 November, 2009, 10:08 AM
>
>
> Lucene will index and store the fields that you tell it to when a
> document is written to the index.
>
> In lucene 2.4 doc.getFields() returns a List of all the fields in a
> document and probably in 2.3.2 as well.  See the javadoc.  That will
> tell you the fields that have been stored but I think not necessarily
> those that have been indexed i.e. made searchable.
>
> Luke can tell you pretty much everything about an index.
>
>
> --
> Ian.
>
>
> On Mon, Nov 23, 2009 at 9:42 AM, DHIVYA M <[hidden email]>
> wrote:
> > Sir,
> >
> > Am using lucene 2.3.2. I would like to know what are the fields that are
> been indexed?
> >
> > Ex:
> >
> > doc.get("path");
> >
> > this statement returns the path of the document
> >
> > like "path" what are the other fields of the document used by lucene
> >
> > I went through converting all the class files to java files and read all
> the files. But i got confused with the things available in cluster.
> >
> > So, Can anyone tell me how to find it out?
> >
> >
> > Thanks in advance,
> > Dhivya
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
>
>       The INTERNET now has a personality. YOURS! See your Yahoo! Homepage.
> http://in.yahoo.com/
>



      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
Reply | Threaded
Open this post in threaded view
|

Re: autosuggest - in the sense of autocomplete

Anshum-2
For auto complete, you could try the following:
1. Run a prefix query. [Could be a  fuzzy query]
2. Index using something like ngrams.
term : sample is indexed as 4 terms, viz:
t
te
ter
term

--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Mon, Nov 23, 2009 at 4:28 PM, DHIVYA M <[hidden email]>wrote:

> Sir,
>
> I actually meant auto suggest as such available for google suggest similar
> to autocomplete.
> Where, users need not type the entire text and instead can go with the
> suggestions available.
>
> Thanks in advance,
> Dhivya
>
> --- On *Mon, 23/11/09, Anshum <[hidden email]>* wrote:
>
>
> From: Anshum <[hidden email]>
> Subject: Re: How to find the fields that are indexed?
> To: [hidden email]
> Date: Monday, 23 November, 2009, 10:35 AM
>
> By autosuggest, would you mean similar documents?
> In that case you could try the lucene 'morelikethis' class.
>
> --
> Anshum Gupta
> Naukri Labs!
> http://ai-cafe.blogspot.com
>
> The facts expressed here belong to everybody, the opinions to me. The
> distinction is yours to draw............
>
>
> On Mon, Nov 23, 2009 at 3:42 PM, DHIVYA M <[hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=dhivyakrishnan87@...>
> >wrote:
>
> > That was a good solution to my problem and i found my fields for the
> > document.
> > Acutally i was trying it to find out how to implement autosuggest with
> > lucene.
> > Can you suggest me an idea of how to use autosuggest wih lucene.
> >
> > Thanks in advance,
> > Dhivya
> >
> > --- On Mon, 23/11/09, Ian Lea <[hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=ian.lea@...>>
> wrote:
> >
> >
> > From: Ian Lea <[hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=ian.lea@...>
> >
> > Subject: Re: How to find the fields that are indexed?
> > To: [hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=java-user@...>
> > Date: Monday, 23 November, 2009, 10:08 AM
> >
> >
> > Lucene will index and store the fields that you tell it to when a
> > document is written to the index.
> >
> > In lucene 2.4 doc.getFields() returns a List of all the fields in a
> > document and probably in 2.3.2 as well.  See the javadoc.  That will
> > tell you the fields that have been stored but I think not necessarily
> > those that have been indexed i.e. made searchable.
> >
> > Luke can tell you pretty much everything about an index.
> >
> >
> > --
> > Ian.
> >
> >
> > On Mon, Nov 23, 2009 at 9:42 AM, DHIVYA M <[hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=dhivyakrishnan87@...>
> >
> > wrote:
> > > Sir,
> > >
> > > Am using lucene 2.3.2. I would like to know what are the fields that
> are
> > been indexed?
> > >
> > > Ex:
> > >
> > > doc.get("path");
> > >
> > > this statement returns the path of the document
> > >
> > > like "path" what are the other fields of the document used by lucene
> > >
> > > I went through converting all the class files to java files and read
> all
> > the files. But i got confused with the things available in cluster.
> > >
> > > So, Can anyone tell me how to find it out?
> > >
> > >
> > > Thanks in advance,
> > > Dhivya
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=java-user-unsubscribe@...>
> > For additional commands, e-mail: [hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=java-user-help@...>
> >
> >
> >
> >
> >       The INTERNET now has a personality. YOURS! See your Yahoo!
> Homepage.
> > http://in.yahoo.com/
> >
>
>
> ------------------------------
> The INTERNET now has a personality. YOURS! See your Yahoo! Homepage<http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/>
> .
>
Reply | Threaded
Open this post in threaded view
|

RE: autosuggest - in the sense of autocomplete

Uwe Schindler
If you just want to autocomplete the current term the user enters,
initialize a TermEnum with the current entered term fragment. If you then
iterate through the termenum, you get all terms that exist in the index
*after* that term (in unicode codepoint order). Stop iterating, when the
term does not any more starts with the prefix the user has given. This is
the simpliest autocomplete you can think of. All other types like presenting
related terms needs a separate index or some other database/structure.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: [hidden email]

> -----Original Message-----
> From: Anshum [mailto:[hidden email]]
> Sent: Monday, November 23, 2009 6:00 PM
> To: [hidden email]
> Subject: Re: autosuggest - in the sense of autocomplete
>
> For auto complete, you could try the following:
> 1. Run a prefix query. [Could be a  fuzzy query]
> 2. Index using something like ngrams.
> term : sample is indexed as 4 terms, viz:
> t
> te
> ter
> term
>
> --
> Anshum Gupta
> Naukri Labs!
> http://ai-cafe.blogspot.com
>
> The facts expressed here belong to everybody, the opinions to me. The
> distinction is yours to draw............
>
>
> On Mon, Nov 23, 2009 at 4:28 PM, DHIVYA M
> <[hidden email]>wrote:
>
> > Sir,
> >
> > I actually meant auto suggest as such available for google suggest
> similar
> > to autocomplete.
> > Where, users need not type the entire text and instead can go with the
> > suggestions available.
> >
> > Thanks in advance,
> > Dhivya
> >
> > --- On *Mon, 23/11/09, Anshum <[hidden email]>* wrote:
> >
> >
> > From: Anshum <[hidden email]>
> > Subject: Re: How to find the fields that are indexed?
> > To: [hidden email]
> > Date: Monday, 23 November, 2009, 10:35 AM
> >
> > By autosuggest, would you mean similar documents?
> > In that case you could try the lucene 'morelikethis' class.
> >
> > --
> > Anshum Gupta
> > Naukri Labs!
> > http://ai-cafe.blogspot.com
> >
> > The facts expressed here belong to everybody, the opinions to me. The
> > distinction is yours to draw............
> >
> >
> > On Mon, Nov 23, 2009 at 3:42 PM, DHIVYA M
> <[hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=d
> [hidden email]>
> > >wrote:
> >
> > > That was a good solution to my problem and i found my fields for the
> > > document.
> > > Acutally i was trying it to find out how to implement autosuggest with
> > > lucene.
> > > Can you suggest me an idea of how to use autosuggest wih lucene.
> > >
> > > Thanks in advance,
> > > Dhivya
> > >
> > > --- On Mon, 23/11/09, Ian Lea
> <[hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=ian.lea@gm
> ail.com>>
> > wrote:
> > >
> > >
> > > From: Ian Lea
> <[hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=ian.lea@gm
> ail.com>
> > >
> > > Subject: Re: How to find the fields that are indexed?
> > > To: java-
> [hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=java-
> [hidden email]>
> > > Date: Monday, 23 November, 2009, 10:08 AM
> > >
> > >
> > > Lucene will index and store the fields that you tell it to when a
> > > document is written to the index.
> > >
> > > In lucene 2.4 doc.getFields() returns a List of all the fields in a
> > > document and probably in 2.3.2 as well.  See the javadoc.  That will
> > > tell you the fields that have been stored but I think not necessarily
> > > those that have been indexed i.e. made searchable.
> > >
> > > Luke can tell you pretty much everything about an index.
> > >
> > >
> > > --
> > > Ian.
> > >
> > >
> > > On Mon, Nov 23, 2009 at 9:42 AM, DHIVYA M
> <[hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=d
> [hidden email]>
> > >
> > > wrote:
> > > > Sir,
> > > >
> > > > Am using lucene 2.3.2. I would like to know what are the fields that
> > are
> > > been indexed?
> > > >
> > > > Ex:
> > > >
> > > > doc.get("path");
> > > >
> > > > this statement returns the path of the document
> > > >
> > > > like "path" what are the other fields of the document used by lucene
> > > >
> > > > I went through converting all the class files to java files and read
> > all
> > > the files. But i got confused with the things available in cluster.
> > > >
> > > > So, Can anyone tell me how to find it out?
> > > >
> > > >
> > > > Thanks in advance,
> > > > Dhivya
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: java-user-
> [hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to
> =[hidden email]>
> > > For additional commands, e-mail: java-user-
> [hidden email]<http://in.mc948.mail.yahoo.com/mc/compose?to=java-
> [hidden email]>
> > >
> > >
> > >
> > >
> > >       The INTERNET now has a personality. YOURS! See your Yahoo!
> > Homepage.
> > > http://in.yahoo.com/
> > >
> >
> >
> > ------------------------------
> > The INTERNET now has a personality. YOURS! See your Yahoo!
> Homepage<http://in.rd.yahoo.com/tagline_yyi_1/*http://in.yahoo.com/>
> > .
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: autosuggest - in the sense of autocomplete

Robert Muir
On Mon, Nov 23, 2009 at 12:14 PM, Uwe Schindler <[hidden email]> wrote:

> If you just want to autocomplete the current term the user enters,
> initialize a TermEnum with the current entered term fragment. If you then
> iterate through the termenum, you get all terms that exist in the index
> *after* that term (in unicode codepoint order). Stop iterating, when the
>

actually unicode code unit (utf-16) order...

--
Robert Muir
[hidden email]