I've posted a self-contained test case to github of a mystery.
git://github.com/bimargulies/lucene-4-update-case.git
The code can be seen at
https://github.com/bimargulies/lucene-4-update-case/blob/master/src/test/java/org/apache/lucene/BadFieldTokenizedFlagTest.java.
I write a doc to an index,
I think the issue is that your analyzer is standardanalyzer, yet field
text value is value-1
So standardanalyzer will tokenize this into two terms: value and 1
But later, you proceed to do TermQueries on value-1. This term won't
exist... TermQuery etc that take Term don't analyze any text.
On Tue, Mar 6, 2012 at 9:20 AM, Robert Muir rcm...@gmail.com wrote:
I think the issue is that your analyzer is standardanalyzer, yet field
text value is value-1
Robert,
Why is this field analyzed at all? It's built with StringField.TYPE_STORED.
I'll push another copy that shows that it works
On Tue, Mar 6, 2012 at 9:23 AM, Benson Margulies bimargul...@gmail.com wrote:
On Tue, Mar 6, 2012 at 9:20 AM, Robert Muir rcm...@gmail.com wrote:
I think the issue is that your analyzer is standardanalyzer, yet field
text value is value-1
Robert,
Why is this field analyzed at all? It's
On Tue, Mar 6, 2012 at 9:23 AM, Benson Margulies bimargul...@gmail.com wrote:
On Tue, Mar 6, 2012 at 9:20 AM, Robert Muir rcm...@gmail.com wrote:
I think the issue is that your analyzer is standardanalyzer, yet field
text value is value-1
Robert,
Why is this field analyzed at all? It's
Hmm something is up here... I'll dig. Seems like we are somehow
analyzing StringField when we shouldn't...
Mike McCandless
http://blog.mikemccandless.com
On Tue, Mar 6, 2012 at 9:33 AM, Robert Muir rcm...@gmail.com wrote:
On Tue, Mar 6, 2012 at 9:23 AM, Benson Margulies bimargul...@gmail.com
On Tue, Mar 6, 2012 at 9:33 AM, Robert Muir rcm...@gmail.com wrote:
On Tue, Mar 6, 2012 at 9:23 AM, Benson Margulies bimargul...@gmail.com
wrote:
On Tue, Mar 6, 2012 at 9:20 AM, Robert Muir rcm...@gmail.com wrote:
I think the issue is that your analyzer is standardanalyzer, yet field
text
, 2012 3:42 PM
To: java-user@lucene.apache.org
Subject: Re: Problem with updating a document or TermQuery with current
trunk
Hmm something is up here... I'll dig. Seems like we are somehow analyzing
StringField when we shouldn't...
Mike McCandless
http://blog.mikemccandless.com
On Tue
Message-
From: Michael McCandless [mailto:luc...@mikemccandless.com]
Sent: Tuesday, March 06, 2012 3:42 PM
To: java-user@lucene.apache.org
Subject: Re: Problem with updating a document or TermQuery with current
trunk
Hmm something is up here... I'll dig. Seems like we are somehow
: Michael McCandless [mailto:luc...@mikemccandless.com]
Sent: Tuesday, March 06, 2012 3:42 PM
To: java-user@lucene.apache.org
Subject: Re: Problem with updating a document or TermQuery with current
trunk
Hmm something is up here... I'll dig. Seems like we are somehow analyzing
StringField
with updating a document or TermQuery with current
trunk
Hmm something is up here... I'll dig. Seems like we are somehow analyzing
StringField when we shouldn't...
Mike McCandless
http://blog.mikemccandless.com
On Tue, Mar 6, 2012 at 9:33 AM, Robert Muir rcm...@gmail.com wrote:
On Tue, Mar 6, 2012
On Tue, Mar 6, 2012 at 10:06 AM, Benson Margulies bimargul...@gmail.com wrote:
On Tue, Mar 6, 2012 at 10:04 AM, Robert Muir rcm...@gmail.com wrote:
Thanks Benson: look like the problem revolves around indexing
Document/Fields you get back from IR.document... this has always been
'lossy', but I
I am walking down the document in an index by number, and I find that
I want to update one. The updateDocument API only works on queries and
terms, not numbers.
So I can call remove and add, but, then, what's the document's number
after that? Or is that not a meaningful question until I make a
if you want to identify a document, you should use a field such as url as
Unique Key in solr
On Mon, Mar 5, 2012 at 12:31 AM, Benson Margulies bimargul...@gmail.comwrote:
I am walking down the document in an index by number, and I find that
I want to update one. The updateDocument API only
document id will be subject to changes. and all segments' document id is
starting from zero. after a merge, document ids will also change.
On Mon, Mar 5, 2012 at 12:31 AM, Benson Margulies bimargul...@gmail.comwrote:
I am walking down the document in an index by number, and I find that
I want
Try Term term = new Term(DocId, contract.getDocId());. See the
javadocs for the difference between that and what you have.
You don't need to call optimize() all the time, it at all.
--
Ian.
On Fri, Jun 10, 2011 at 9:24 AM, Pranav goyal
pranavgoyal40...@gmail.com wrote:
Hi,
I tried 3-4
Hi Ian,
Thanks for your reply. But even this isn't working.
My document is not getting deleted.
Can you please suggest me something else?
On Fri, Jun 10, 2011 at 3:21 PM, Ian Lea ian@gmail.com wrote:
Try Term term = new Term(DocId, contract.getDocId());. See the
javadocs for the
When I am using a deleteAll() instead of deleteDocuments();
it's working fine.
What can be the problem. Still not able to figure it out.
On Fri, Jun 10, 2011 at 3:50 PM, Pranav goyal pranavgoyal40...@gmail.comwrote:
Hi Ian,
Thanks for your reply. But even this isn't working.
My document is
You delete it first using your id:
writer.deleteDocuments(term);
and then re-add it with the same id:
writer.addDocument(d);
Please explain:
How looks your document BEFORE you try to delete it? (Which fields has it?)
Greetings Danny
Hi Danny,
I have explained it above.
It has many fields out of which DocId is the field which I am storing as
well as indexing. While other fields I am just storing.
And Each document has unique DocId.
d=new Document();
File indexDir = new File(./index-dir);
StandardAnalyzer analyzer = new
In different code samples you've got both DocId and DocID. If that
isn't the problem I suggest you post a complete little program that
demonstrates the problem. As small as possible, no external
dependencies.
--
Ian.
On Fri, Jun 10, 2011 at 12:24 PM, Pranav goyal
pranavgoyal40...@gmail.com
Well, taking the code all together, what I expect is
that you'll have a document after all is done that
only has a DocId in it. Nowhere do you fetch
the document from the index.
What is your evidence that you haven't deleted
the document? If you haven't reopened your reader
after the above,
!
-Original Message-
From: John Powers [mailto:[EMAIL PROTECTED]
Sent: Sat 1/28/2006 9:13 PM
To: java-user@lucene.apache.org
Subject: RE: problem updating a document: no segments file?
i feel confident in the delete sequence. i will run the things you ask for
though.this does work on my
: this code works in a couple other boxes as is. that deleting code
Are those boxes running the same OS? The same JVM?
: removes the active index after this one builds in a different location.
: then the searcher is told to make this newest one the current and the
: old one is deleted. it
it out of the new path. no, the boxes have different windows
operating systems.probobly a slight difference in jvm.
-Original Message-
From: [EMAIL PROTECTED] on behalf of Chris Hostetter
Sent: Sat 1/28/2006 2:37 AM
To: java-user@lucene.apache.org
Subject: RE: problem updating
: problem updating a document: no segments file?
Hello,
I have a couple instances of lucene. I just altered on implementation
and now its not keeping a segments file. while indexing occurs, there
is a segment file.but once its done, there isn't.all the other
indexes have one
Hello,
I have a couple instances of lucene. I just altered on implementation and now
its not keeping a segments file. while indexing occurs, there is a segment
file.but once its done, there isn't.all the other indexes have one.
the problem comes when i try to update a document,
Hi,
some times ago I posted a comment which asking this question (which is
by no means new) about updating a Lucene document without re-analyzing,
that is, where we expect the token-streams to be copied into the new
document and where I intend to change only a few keyword values.
I cannot
That could be, indeed, a good way for today.
I'm still dreaming to find a
((DocumentOfSomeSort) document).getTokenStream(fieldName)
for stored and non-stored fields!
paul
Le 8 sept. 05, à 11:56, [EMAIL PROTECTED] a écrit :
My understanding is that by splitting your fields into two
29 matches
Mail list logo