lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mag Gam" <magaw...@gmail.com>
Subject Re: Example question
Date Sun, 17 Sep 2006 21:08:03 GMT
Sorry for the confusion all.

The code i am talking about is, the lucene-2.0 API

Document doc = hits.doc(i);
String path = doc.get("path");

lucene-2.0.0/src/demo/org/apache/lucene/demo/SearchFiles.java (line 147)


I am not sure where they are getting the "path". How are they inserting it
into the index?

Basically, I am trying to index the contents of the files, and the
filesystem written date. Therefore, I started to create an index, but I am
having no luck in either. I have simply been using the example indexing :-(


TIA



On 9/16/06, Chris Hostetter <hossman_lucene@fucit.org> wrote:
>
>
> : No, I am talking about the Lucene Examples (not from LIA).
>
> you're going to need to be more specific about what you mean ... what is
> the exact location of the file where you are seeing the "Example" in
> question? ... is it a URL? is it a file from a release you downloaded?
> what is the URL of the release?
>
> If i had to guess, i'd assume you are talking about either this file...
>
>
>
> http://svn.apache.org/viewvc/lucene/java/trunk/src/demo/org/apache/lucene/demo/SearchFiles.java
> or one of these files...
> http://svn.apache.org/viewvc/lucene/java/trunk/src/jsp/
>
> ...but i can't be sure because none of those file have the exact string
> you mentioned...
>
> : > > out.println (doc.get ("path"));
> : > >
> : > > I am not sure how is "path" is getting into the index. If you take
>
> ... they do refrence a field named "path", so it's my best guess,
> except that...
>
> : > > the Index code, there is no mention of "path". My question are:
> : > > what is this
> : > > path (I know it prints out the filesystem path)? Is this a reserved
>
> ...both HTMLDocument and FieldDocument (the classes used to build the
> indexes for the demo code) do in fact crete fields named "apth" .... hence
> i am stumped as to what exactly you are looking at.
>
> : > > so, where can I get a list of reserved words? How can I list all
> : > > hashes like
> : > > "path" ?
>
> there are no reserved field names, but you can get a list of all the
> fields in a document using Document.getFields()
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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