Re: Lucene search Format

2008-08-01 Thread richa
Dear Anshum, Thanks for the reply. I managed to reach to the user folder by the following query : "PATH:\"/app:company_home/app:user_homes/cm:userfolder\"" It is the string parameter that i'm passing and it does stored the file in the userfolder. Thanx Richa Anshum-2 wrote: > > Perhaps we c

Re: getting started

2008-08-01 Thread roy-lucene-user
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

Re: deleting documents with doc id

2008-08-01 Thread Cam Bazz
well just checked the api, the deleteDocuments(term[]) method deletes any document containing any of the terms. I think I will go to the trunk version. best. -c.a. On Sat, Aug 2, 2008 at 12:14 AM, Cam Bazz <[EMAIL PROTECTED]> wrote: > > from what I understand: > there is a deleteDocuments by a

Re: deleting documents with doc id

2008-08-01 Thread Cam Bazz
from what I understand: there is a deleteDocuments by a term array method? I was asking if there was a side effect of deleting from indexReader that i get from an indexsearcher and not the writer. Best. On Sun, Jul 27, 2008 at 9:44 PM, Karsten F. <[EMAIL PROTECTED]>wrote: > > Hi, > > only to b

Re: The best strategy to "How store multiple fields of same document"

2008-08-01 Thread Anshum
Hey Sergey, With that kind of a dimension I guess you could work with multiple fields. I have tried it over a score of fields for over 10 million documents. Works fine if implemented neatly. Is there more that you would be doing other than vanilla search? -- Anshum Gupta Naukri Labs! On Thu, Jul 3

Re: Lucene search Format

2008-08-01 Thread Anshum
Perhaps we could help you with the query formation in case you make your case a little clear viz. how do you index and what do you search for? -- Anshum Naukri Labs! On Fri, Aug 1, 2008 at 7:44 PM, richa <[EMAIL PROTECTED]> wrote: > > Hi!! > > I'm abst new to Lucene. > I'm trying to create a que

Re: query API for program-generated query (please help..)

2008-08-01 Thread Otis Gospodnetic
Hi, It could be enough to simply combine both queries into a single query string and pass that on as the query to the IndexSearcher. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: Siti Rochimah <[EMAIL PROTECTED]> > To: java-user@lucene.

query API for program-generated query (please help..)

2008-08-01 Thread Siti Rochimah
Hi, I'm a new user for Lucene. I would like to make search-engine program with program-generated query rather than user-input query. If anyone knows how to make a query API for this purpose, please share the code... Thanks. siti_r -

Re: FileNotFoundException during indexing

2008-08-01 Thread Michael McCandless
From this log I can see you do in fact have two IndexWriters open at the same time (see how IW 6 and IW 42 have intermingled log lines right before the exception). Are you sure you're not still unlocking the index? Without unlocking the index, and if you're using either Simple or NativeF

Re: Lucene search Format

2008-08-01 Thread Ian Lea
How are you analyzing the PATH, at indexing and search time? They need to be the same. You've got plenty of quotes, some escaped, and other delimiters in there. It should probably be stored and searched untokenized, without the quotes. -- Ian. On Fri, Aug 1, 2008 at 3:14 PM, richa <[EMAIL PRO

Re: FileNotFoundException during indexing

2008-08-01 Thread Wojtek212
Here is Lucene log with first exceptions that occured (FSDirectory with NativeFSLockFactory). IFD [Thread-79]: setInfoStream [EMAIL PROTECTED] IW 4 [Thread-79]: setInfoStream: dir=org.apache.lucene.store.FSDirectory@/tmp/content/3615.0-3618.0 autoCommit=true [EMAIL PROTECTED] [EMAIL PROTECTED] ra

Re: getting started

2008-08-01 Thread ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)
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

Re: getting started

2008-08-01 Thread ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)
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 >

Lucene search Format

2008-08-01 Thread richa
Hi!! I'm abst new to Lucene. I'm trying to create a query using Lucene search to get the correct reference for a folder. The query is fine if it has to go to the parent folder. But if i try to reach to the child folder, it throws an error. For example Query query = new Query(Constants.QUERY_LANG_

RE: getting started

2008-08-01 Thread Brittany Jacobs
What is the web address you are seeing this message on? Brittany Jacobs Java Developer JBManagement, Inc. 12 Christopher Way, Suite 103 Eatontown, NJ 07724 ph: 732-542-9200 ext. 229 fax: 732-380-0678 email: [EMAIL PROTECTED] -Original Message- From: ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) [mailto:[

Re: getting started

2008-08-01 Thread Ian Lea
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

Re: getting started

2008-08-01 Thread ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)
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, >

RE: getting started

2008-08-01 Thread Brittany Jacobs
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. The

Re: getting started

2008-08-01 Thread roy-lucene-user
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

Re: getting started

2008-08-01 Thread Ian Lea
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.

getting started

2008-08-01 Thread Brittany Jacobs
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

getting started

2008-08-01 Thread Brittany Jacobs
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

Re: FileNotFoundException during indexing

2008-08-01 Thread Wojtek212
The strange thing is that when I use only FSDirectory with SimpleFSLockFactory I don't see any exception (or I couldn't reproduce the problem). FSDirectory with NativeFSLockFactory doesn't work as well as my implementation of Directory and Lock (based on java.nio). Hmmm, I don't see the reason of

Re: FileNotFoundException during indexing

2008-08-01 Thread Michael McCandless
Hmmm OK. I would stick with the NativeFSLockFactory, and never call IndexReader.unlock. Can you call IndexWriter.setInfoStream, and then post the resulting log? It may provide clues of what's happening. Also, if you can narrow this to a small test case that shows the exception, that'd

Re: FileNotFoundException during indexing

2008-08-01 Thread Wojtek212
I've checked unlock ant it is not called until exception occurs. BTW, I' ve tried to use FSDirectorectory with NativeFSLockFactory and I didn't get LockObtainFailedException. I removed also this part making unlocking (IndexReader.unlock). The exception is: Exception in thread "Thread-95" org.apa

Re: SpanRegexQuery

2008-08-01 Thread Erik Hatcher
On Jul 31, 2008, at 10:06 PM, Christopher M Collins wrote: I'm trying to use SpanRegexQuery as one of the clauses in my SpanQuery. When I give it a regex like: "L[a-z]+ing" and do a rewrite on the final query I get terms like "Labinger" and "Lackonsingh" along with the expected terms "Labe

Re: FileNotFoundException during indexing

2008-08-01 Thread Michael McCandless
Another option is to switch to native locks (dir.setLockFactory(new NativeFSLockFactory()), at which point you will never have to call IndexReader.unLock because native locks are always properly released by the OS when the JVM exits/crashes. If on switching to native locks, and removing t

Re: FileNotFoundException during indexing

2008-08-01 Thread Michael McCandless
Wojtek212 wrote: Hi Mike, I'm sharing one instance of IndexManager across all threads and as I've noticed only this one is used during indexing. OK, maybe triple check this -- because that's the only way in your code I can see 2 IWs being live at once. I'm unlocking before every inde

Re: FileNotFoundException during indexing

2008-08-01 Thread Wojtek212
Hi Mike, I'm sharing one instance of IndexManager across all threads and as I've noticed only this one is used during indexing. I'm unlocking before every indexing operation to make sure it would be possible. When IndexWriter is closed I assume it releases the lock and finishes its work. Does Ind