Updating a document.

2012-03-04 Thread Benson Margulies
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

Re: Updating a document.

2012-03-04 Thread Li Li
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

Re: Updating a document.

2012-03-04 Thread Li Li
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

PrecedenceQueryParser vs. QueryParser discrepancy

2012-03-04 Thread wburzyns
Hi devs, There is a discrepancy in parsing behavior between PrecedenceQueryParser and QueryParser if the query is both single term and negative-only, e.g. -exchange:nasdaq. In this case with QueryParser the returned Query object is instanceof BooleanQuery whereas with PrecedenceQueryParser

Return value (or lack thereof) from IndexWriter.deleteDocuments

2012-03-04 Thread Benson Margulies
Is there a reason why this doesn't return a count? Would a JIRA requesting same be viewed with any sympathy? - To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail:

Re: Return value (or lack thereof) from IndexWriter.deleteDocuments

2012-03-04 Thread Francisco A. Lozano
Today I was thinking the same with the update operation. Is there any reason these are not provided? Francisco A. Lozano On Sun, Mar 4, 2012 at 22:42, Benson Margulies bimargul...@gmail.com wrote: Is there a reason why this doesn't return a count? Would a JIRA requesting same be viewed with

Re: Return value (or lack thereof) from IndexWriter.deleteDocuments

2012-03-04 Thread Michael McCandless
It's because the delete is buffered and only later applied in batch... so we can't easily know the count. Mike McCandless http://blog.mikemccandless.com On Sun, Mar 4, 2012 at 4:42 PM, Benson Margulies bimargul...@gmail.com wrote: Is there a reason why this doesn't return a count? Would a JIRA

which fields are included in similarity?

2012-03-04 Thread Benson Margulies
TopDocs top = searcher.search(contextQuery, filter, maxDocsToRetrieve); Which document fields are included in the calculation of the scores in the returned items? All fields? All fields touched in the query? Would I need a custom Similarity to exclude some?