Re: IndexWriter.deleteDocuments(Query[]) not deleting

2010-08-22 Thread Paul J. Lucas
On Aug 22, 2010, at 1:47 PM, Erick Erickson wrote: > Did you issue a commit (or close) the IndexWriter after you deleted the > documents? I originally wrote: > I create/close a new IndexWriter for the delete. So the answer is "yes." > ... are you sure your cases match when you submit your term

IndexWriter.deleteDocuments(Query[]) not deleting

2010-08-22 Thread Paul J. Lucas
Hi - Using Lucene 2.9.3, I'm indexing the metadata in image files. For each image ("document" in Lucene), I have 2 additional special fields: "FILE-PATH" (containing the full path of the file) and "DIR-PATH" (containing the full path of the directory the file is in). The FILE-PATH Field is cr

Hints on implementing XQuery full-text search

2010-01-13 Thread Paul J. Lucas
Hi - I've used Lucene on a previous project, so I am somewhat familiar with the API. However, I've never had to do anything "fancy" (where "fancy" means things like using filters, different analyzers, boosting, payloads, etc). I'm about to embark on implementing the full-text search feature of

Deleting documents using "starts with"

2009-10-26 Thread Paul J. Lucas
I currently have code that looks like: Term[] terms = new Term[]{ new Term( key1, value1 ), new Term( key2, value2 ) }; writer.deleteDocuments( terms ); I want to change things such that it will delete all documents having key2's value start with value2, i.e., if va

IndexWriter.deleteDocuments(Term) and Field.Store.YES

2009-07-20 Thread Paul J. Lucas
If I have a field: Field f = new Field( "F", "foo", Field.Store.YES, Field.Index.NOT_ANALYZED ); can I later do: Term t = new Term( "F", "foo" ); myIndexWriter.deleteDocuments( t ); and have it work even though the field is Field.Store.YES ? Does the YES/NO make any diff

Re: Migrating from Hit/Hits to TopDocs/TopDocCollector

2009-06-11 Thread Paul J. Lucas
On Jun 11, 2009, at 1:49 AM, Ian Lea wrote: This thread seems to be veering well away from your original straightforward question on how to convert your straighforward code. So what? It's about Lucene and hence on-topic. Why do you care? If you want or need these advanced solutions, fine,

Re: Migrating from Hit/Hits to TopDocs/TopDocCollector

2009-06-10 Thread Paul J. Lucas
On Jun 10, 2009, at 5:02 PM, Yonik Seeley wrote: On Wed, Jun 10, 2009 at 7:58 PM, Daniel Noll wrote: It's a shame we don't have an inverted kind of HitCollector where we can say "give me the next hit", so that we can get the best of both worlds (like what StAX gives us in the XML world.) You

Re: Migrating from Hit/Hits to TopDocs/TopDocCollector

2009-06-10 Thread Paul J. Lucas
On Jun 10, 2009, at 10:49 AM, Uwe Schindler wrote: To optimize, store the filename not as stored field, but as a non- tokenized, indexed term. How do you do that? - Paul - To unsubscribe, e-mail: java-user-unsubscr...@lucen

Re: Migrating from Hit/Hits to TopDocs/TopDocCollector

2009-06-10 Thread Paul J. Lucas
On Jun 10, 2009, at 3:17 AM, Uwe Schindler wrote: A HitCollector is the correct way to do this (especially because the order of hits is mostly not interesting when retrieving all hits). OK, here's what I came up with: Term t = /* ... */ Collection files = new LinkedList(); FieldS

Migrating from Hit/Hits to TopDocs/TopDocCollector

2009-06-09 Thread Paul J. Lucas
I have existing code that's like: final Term t = /* ... */; final Iterator i = searcher.search( new TermQuery( t ) ).iterator(); while ( i.hasNext() ) { final Hit hit = (Hit)i.next(); // "FILE" is the field that recorded the original file indexed

Re: All the values of a particular field

2009-03-19 Thread Paul J. Lucas
09, at 10:26 AM, Erick Erickson wrote: See TermEnum/TermDocs. On Thu, Mar 19, 2009 at 12:41 PM, Paul J. Lucas wrote: The Lucene FAQ has a Q, "How do I retrieve all the values of a particular field that exists within an index, across all documents?" and gives some code.

Re: All the values of a particular field

2009-03-19 Thread Paul J. Lucas
Uhm, a code snippet, perhaps?? Thanks. - Paul On Mar 19, 2009, at 10:26 AM, Erick Erickson wrote: See TermEnum/TermDocs. On Thu, Mar 19, 2009 at 12:41 PM, Paul J. Lucas wrote: The Lucene FAQ has a Q, "How do I retrieve all the values of a particular field that exists with

All the values of a particular field

2009-03-19 Thread Paul J. Lucas
The Lucene FAQ has a Q, "How do I retrieve all the values of a particular field that exists within an index, across all documents?" and gives some code. However, it looks like that code returns only unique values. How does one get all values including duplicates? - Paul -

Re: Interrupting a query

2008-07-22 Thread Paul J. Lucas
e hit collector check to see if your interrupt flag has been set and then exit out. On Jul 16, 2008, at 9:54 AM, Paul J. Lucas wrote: That has nothing to do with interrupting a query at some arbitrary time. On Jul 16, 2008, at 5:14 AM, Grant Ingersoll wrote: See https://issues.apache.org

Re: Interrupting a query

2008-07-16 Thread Paul J. Lucas
That has nothing to do with interrupting a query at some arbitrary time. - Paul On Jul 16, 2008, at 5:14 AM, Grant Ingersoll wrote: See https://issues.apache.org/jira/browse/LUCENE-997 -Grant On Jul 16, 2008, at 12:22 AM, Paul J. Lucas wrote: If a complicated query is running in a Thread

Interrupting a query

2008-07-16 Thread Paul J. Lucas
If a complicated query is running in a Thread, how does Lucene respond to Thread.interrupt()? I want to be able to interrupt an in-progress query. - Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: Sorting case-insensitively

2008-07-14 Thread Paul J. Lucas
On Jul 10, 2008, at 2:24 PM, Chris Hostetter wrote: if you could submit a test case that reproduces this using a trivial subclass (just return the orriginal String as the Comparable) that can help us verify the bug and the fix. See my e-mail dated July 3, 2008. Assuming i'm right, I don'tr

Re: Sorting case-insensitively

2008-07-10 Thread Paul J. Lucas
On Jul 9, 2008, at 10:14 PM, Chris Hostetter wrote: I'm going to guess you have a doc where that field doesn't have a value. ordinarily that's fine, but maybe SortComparator doesn't handle that case very well. But how does the built-in STRING sort work with null values then? And how do I

Re: Sorting case-insensitively

2008-07-04 Thread Paul J . Lucas
On Jun 30, 2008, at 8:08 PM, Paul J. Lucas wrote: On Jun 30, 2008, at 8:55 PM, Paul J. Lucas wrote: If I have a SortField with a type of STRING, is there any way to sort in a case-insensitive manner? Couldn't I also use a custom SortComparator? OK, so I tried that by

Re: FileNotFoundException in ConcurrentMergeScheduler

2008-07-01 Thread Paul J. Lucas
That really can't be it. I have *one* client connecting to my server. And there isn't a descriptor leak. My mergeFactor is 10. - Paul On Jul 1, 2008, at 1:37 AM, Michael McCandless wrote: Hmmm then it sounds possible you were in fact running out of file descriptors. What was your merg

Re: Sorting case-insensitively

2008-06-30 Thread Paul J. Lucas
On Jun 30, 2008, at 7:00 PM, Erik Hatcher wrote: On Jun 30, 2008, at 8:55 PM, Paul J. Lucas wrote: If I have a SortField with a type of STRING, is there any way to sort in a case-insensitive manner? Only if you unify the case (lower case everything) on the client side that you send to

Sorting case-insensitively

2008-06-30 Thread Paul J. Lucas
If I have a SortField with a type of STRING, is there any way to sort in a case-insensitive manner? - Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: FileNotFoundException in ConcurrentMergeScheduler

2008-06-30 Thread Paul J. Lucas
IMHO, should have worked just fine. - Paul On May 30, 2008, at 2:59 AM, Michael McCandless wrote: Paul J. Lucas wrote: On May 29, 2008, at 6:35 PM, Michael McCandless wrote: Can you use lsof (or something similar) to see how many files you have? FYI: I personally can't reproduce t

Re: FileNotFoundException in ConcurrentMergeScheduler

2008-05-31 Thread Paul J. Lucas
On May 30, 2008, at 5:59 PM, Michael McCandless wrote: One more question: when you hit that exception, does the offending file in fact not exist (when you list the directory yourself)? Yes, the file does not exist. And, does the exception keep happening consistently (same file missing) onc

Re: FileNotFoundException in ConcurrentMergeScheduler

2008-05-30 Thread Paul J. Lucas
On May 30, 2008, at 3:05 AM, Michael McCandless wrote: Are you indexing only one document each time you open IndexWriter? Or do you open a single IndexWriter, add all documents for that directory, then close it? The latter. When the exception occurs, do you know how many simultaneous thre

Re: FileNotFoundException in ConcurrentMergeScheduler

2008-05-29 Thread Paul J. Lucas
On May 29, 2008, at 6:35 PM, Michael McCandless wrote: Can you use lsof (or something similar) to see how many files you have? FYI: I personally can't reproduce this; only a coworker can and even then it's sporadic, so it could take a little while. Merging, especially several running at o

Re: FileNotFoundException in ConcurrentMergeScheduler

2008-05-29 Thread Paul J. Lucas
On May 29, 2008, at 6:26 PM, Michael McCandless wrote: Paul J. Lucas wrote: if ( IndexReader.isLocked( INDEX ) ) IndexReader.unlock( INDEX ); The isLocked()/unlock() is because sometimes the server process gets killed and leaves teh indexed locked. This makes me a bit

Re: FileNotFoundException in ConcurrentMergeScheduler

2008-05-29 Thread Paul J. Lucas
On May 29, 2008, at 5:57 PM, Mark Miller wrote: Paul J. Lucas wrote: Are you saying that using multiple IndexSearchers will definitely cause the problem I am experiencing and so the suggestion that using a single IndexSearcher for optimaztion only is wrong? Will it definitely cause your

Re: FileNotFoundException in ConcurrentMergeScheduler

2008-05-29 Thread Paul J. Lucas
On May 29, 2008, at 5:18 PM, Mark Miller wrote: It looks to me like you are not sharing an IndexSearcher across threads. My reading of the documentation says that doing so is an optimization only and not a requirement. Are you saying that using multiple IndexSearchers will definitely ca

FileNotFoundException in ConcurrentMergeScheduler

2008-05-29 Thread Paul J. Lucas
I occasionally get a FileNotFoundException like: Exception in thread "Thread-44" org.apache.lucene.index.MergePolicy $MergeException: java.io.FileNotFoundException: /Stuff/Caches/ AuroraSupport/IM_IndexCache/INDEX/_27.cfs (No such file or directory) at org.apache.lucene.index.ConcurrentMergeSc