Just trying to grasp the concept.
I want to search a text file where each line is a separate item to be
searched. When text it entered by the user, I want to return all the lines
in which that text appears.
For example, if the text file has:
I like apples.
I went to the store.
I bought an
Just trying to grasp the concept.
I want to search a text file where each line is a separate item to be
searched. When text it entered by the user, I want to return all the lines
in which that text appears.
For example, if the text file has:
I like apples.
I went to the store.
I bought an
Each sentence will be a document. Read the file a line at a time and
make each line a separate document.
The user input will be a word, or words, which you can pass through a
QueryParser to get a Query which can be used to search the index, and
which will return matching documents i.e. sentences.
Hello Brittany,
I think the easiest thing for you to do is make each line a Document. You
might want a FileName and LineNumber field on top of a "Text" field, this
way if you need to gather all the lines of your File back together again you
can do a search on the FileName.
So in your case:
Docu
Thank you so much!
-Original Message-
From: Ian Lea [mailto:[EMAIL PROTECTED]
Sent: Friday, August 01, 2008 9:51 AM
To: java-user@lucene.apache.org
Subject: Re: getting started
Each sentence will be a document. Read the file a line at a time and
make each line a separate document
Why should each line be a Document ? If there is a single document having
each line as a Field, then the search would result in a single Document as a
'hit' not the individual lines matching it. Is this right ?
Nagesh
On Fri, Aug 1, 2008 at 7:21 PM, <[EMAIL PROTECTED]> wrote:
> Hello Brittany,
>
Yes, that is correct.
--
Ian.
On Fri, Aug 1, 2008 at 2:59 PM, ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)
<[EMAIL PROTECTED]> wrote:
> Why should each line be a Document ? If there is a single document having
> each line as a Field, then the search would result in a single Document as a
> 'hit' not the indiv
:[EMAIL PROTECTED]
Sent: Friday, August 01, 2008 10:00 AM
To: java-user@lucene.apache.org
Subject: Re: getting started
Why should each line be a Document ? If there is a single document having
each line as a Field, then the search would result in a single Document as a
'hit' not the
Thanks, Ian !
On Fri, Aug 1, 2008 at 7:43 PM, Ian Lea <[EMAIL PROTECTED]> wrote:
> Yes, that is correct.
>
>
> --
> Ian.
>
>
> On Fri, Aug 1, 2008 at 2:59 PM, ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)
> <[EMAIL PROTECTED]> wrote:
> > Why should each line be a Document ? If there is a single document having
>
Hi Brittany,
"What is the web address you are seeing this message on?"
Me ? I am not sure, I followed the question.
Nagesh
On Fri, Aug 1, 2008 at 7:45 PM, ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) <
[EMAIL PROTECTED]> wrote:
> Thanks, Ian !
>
>
> On Fri, Aug 1, 2008 at 7:43 PM, Ian Lea <[EMAIL PROTECTED]> w
That certainly works if the intent is to grab the entire file. If all you
want is that particular line to be returned in the search then that's not
going to work.
Let's say the files was made up of a million lines and the text was stored
in the index (I know, absurd).
When grabbing the Document
Well, this could get to be a really ugly query. Let's say you have 10 lines.
Then the
doc would have 10 different fields? ("line1", "line2" etc.)? Then to search
it
you have to have an or clause across all fields. And a file with 100,000
lines would be
a 100,000 term query.. Or I misunderstand
Ok, say each line is an address. So the text file would look like:
123 Water St. Somerville, GA 12345
456 Easy St. Hope, CA 45676
34 Ocean Blvd. Staten Island, NY 93843
The file would have hundreds of thousands of addresses.
So the user would type "34, St" in the search box and press a "Search"
Hello!
I'm new in the ML and in the Lucene world in general... :)
I re-installed JDK after a very long period in order to start using
Lucene but I had problems after few minutes I finished installing Java
and Lucene.
I installed:
JDK 1.5.0_06
Lucene 1.4.3
I've set the environment variables as fol
Hi, I have a project that involve Lucene.
Currently I,
1) downloaded Lucene-2.4.1. into my CentOS 4.7 box.
2) succesfullly downloaded java, version 6.
3) successfully completed setting CLASSPATH
as I ran the command : java org.apache.lucene.demo.SearchFiles
I get an error saying:
Exception in t
Hi,
Was wondering if someone could help me out with a few things in Korean
as related to Lucene:
1. Which Analyzer do you recommend? From the list, I see that some
have had success with the StandardAnalyzer. Are there any caveats I
should be aware of if I choose to use it?
2. Could anyone
On Dec 26, 2005, at 6:31 PM, Federico Carbonetti wrote:
I'm new in the ML and in the Lucene world in general... :)
ML?
I then tried to follow the instructions found at
http://lucene.apache.org/java/docs/demo.html
so I opened a command prompt and typed: "java
org.apache.lucene.demo.IndexFiles
hello erik and hello everybody!
2005/12/27, Erik Hatcher <[EMAIL PROTECTED]>:
>
> On Dec 26, 2005, at 6:31 PM, Federico Carbonetti wrote:
> > I'm new in the ML and in the Lucene world in general... :)
>
> ML?
>
Mailing List! ehehe! :)
this morning i changed some settings for the PATH variabile,
Are you running the Sun JVM? Or some other JVM?
Erik
On Dec 27, 2005, at 10:25 AM, Federico Carbonetti wrote:
hello erik and hello everybody!
2005/12/27, Erik Hatcher <[EMAIL PROTECTED]>:
On Dec 26, 2005, at 6:31 PM, Federico Carbonetti wrote:
I'm new in the ML and in the Lucene
Hi,
I had the same problem at the beginning.
Try
java -classpath lucene-1.4-final.jar; lucene-demos-1.4-final.jar;
org.apache.lucene.demo.IndexHTML -create -index webindex docs
If this fails go in the org/apache/lucene/demo directory and compile
IndexHTML.java with the command
javac -classp
eMail: u...@thetaphi.de
> -Original Message-
> From: nga pham [mailto:nga.p...@gmail.com]
> Sent: Wednesday, March 18, 2009 9:37 PM
> To: java-user@lucene.apache.org
> Subject: Getting started with Lucene
>
> Hi, I have a project that involve Lucene.
> Curr
i.de
> eMail: u...@thetaphi.de
>
>
> > -Original Message-
> > From: nga pham [mailto:nga.p...@gmail.com]
> > Sent: Wednesday, March 18, 2009 9:37 PM
> > To: java-user@lucene.apache.org
> > Subject: Getting started with Lucene
> >
> > Hi, I have a project that
Hello,
- Original Message -
From: "Grant Ingersoll" <[EMAIL PROTECTED]>
To:
Sent: Friday, November 11, 2005 10:36 PM
Subject: Getting Started with Korean
> Hi,
>
> Was wondering if someone could help me out with a few things in Korean
> as related to Luc
Hi,
On 11/11/05, Grant Ingersoll <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Was wondering if someone could help me out with a few things in Korean
> as related to Lucene:
> 1. Which Analyzer do you recommend? From the list, I see that some
> have had success with the StandardAnalyzer. Are there any c
On 12 Nov 2005, at 01:16, Cheolgoo Kang wrote:
Hi,
Was wondering if someone could help me out with a few things in
Korean
as related to Lucene:
1. Which Analyzer do you recommend? From the list, I see that some
have had success with the StandardAnalyzer. Are there any caveats I
should be
25 matches
Mail list logo