Updating Lucene index from two different threads in a web application

2009-08-31 Thread mitu2009
Hi, I've a web application which uses Lucene for company search functionality. When registered users add a new company,it is saved to database and also gets indexed in Lucene based company search index in real time. When adding company in Lucene index, how do I handle use case of two or more log

How to know when Lucene Index generation process is completed

2009-06-23 Thread mitu2009
Hi, I've a batch job which generates Lucene search indexes every night. I first get all the records from the database and add it to Lucene index using IndexWriter's AddDocument method and then call Optimize method before returning from the method. Since the records fetched are faily large, indexi

Synchronizing Lucene indexes across 2 application servers

2009-06-17 Thread mitu2009
I've a web application which uses Lucene for search functionality. Lucene search requests are served by web services sitting on 2 application servers (IIS 7).The 2 application servers are Load balanced using "netscaler". Both these servers have a batch job running which updates search indexes on

Grouping Lucene search results and calculating frequency by category

2009-04-10 Thread mitu2009
Am working on a store search API using Lucene. I need to show store search results for each City,State combination with its frequency in bracketsfor example: Los Angles,CA (450) Atlant,GA (212) Boston, MA (78) . . . As of now, my search results return around 7000 lucene documents on an aver

Re: Problem using Lucene RangeQuery

2009-04-10 Thread mitu2009
'll have bigger numbers, put more 0's > > All of these and much more are documented on the wiki, javadocs and so > on, please read them first. > > On Thu, Apr 2, 2009 at 05:40, mitu2009 wrote: >> >> I'm using Rangequery to get all the documents which have

Problem using Lucene RangeQuery

2009-04-01 Thread mitu2009
I'm using Rangequery to get all the documents which have amount between say 0 to 2. When i execute the query, Lucene gives me documents which have amount greater than 2 also...What am i missing here? Here is my code: Term lowerTerm = new Term("amount", minAmount); Term upperTerm = new Term("amo

Reading document in Lucene

2009-03-30 Thread mitu2009
My indexed document in Lucene has got multiple cities assigned to it...ie. doc.Add(new Field("city", city1.Trim(), Field.Store.YES, Field.Index.TOKENIZED)); doc.Add(new Field("city", city2.Trim(), Field.Store.YES, Field.Index.TOKENIZED)); etc how do i iterate thru them and read the values after e

Lucene analyzer and dots

2009-03-30 Thread mitu2009
Is there any way I can make Lucene analyzer not ignore dots in the string?? for example,if my search criteria is: "A.B.C.D",Lucene should give me only those documents in the search results which have "A.B.C.D" and not "ABCD" -- View this message in context: http://www.nabble.com/Lucene-anal

Using MultiFieldQueryParser

2009-03-17 Thread mitu2009
Hi, Am working on a book search api using Lucene.User can search for a book whose title or description field contains C.F.A.. Am using Lucene's MultiFieldQueryParser..But after parsing, its removing the dots in the string. What am i missing here? Thanks. -- View this message in context: htt

Using Highlighter for highlighting Phrase query

2009-03-17 Thread mitu2009
Am using this version of Lucene highlighter.net API. I want to get a phrase highlighted only when ALL of its words are present in the search results..But,am not able to do sofor example, if my input search string is "Leading telecom company", then the API only highlights "telecom" in the resul

Deleting and updating documents in Lucene index

2009-03-10 Thread mitu2009
Hi, Am using Lucene.Net dll version 2.0.0.4 Looks like its IndexWriter class does not have methods for DeleteDocument and UpdateDocument.Am i missing something here?How do i achieve delete,update functionality in this version of dll? Version 2.1 Lucene dll seems to have support for delete and up

Re: Sorting lucene search results

2009-01-31 Thread mitu2009
ts) > i.e.: > mySearcher.search(query, TopFieldDocCollector(IndexReader reader, Sort > sort, int > numHits), true); > > Perhaps you could try doing something of this sort. Should work as I > had tried something of this sort successfully a long time ago! > >

Sorting lucene search results

2009-01-30 Thread mitu2009
Hi, I'm using following code to get execute search query in Lucene.Net var collector = new GroupingHitCollector(searcher.GetIndexReader());searcher.Search(myQuery, collector);resultsCount = collector.Hits.Count;How do i sort these search results based on a field? I need to use collector object(

RE: Bubbling up newer records

2009-01-16 Thread mitu2009
quot;)); > TopDocs rs = searcher.search(query, null, 10); > System.out.println("Total hits: " + rs.totalHits); > > Document firstHit = searcher.doc(rs.scoreDocs[0].doc); > System.out.println("First hit ID (newest=3): " >

RE: Bubbling up newer records

2009-01-16 Thread mitu2009
tOmitNorms(true); > doc.add(daysField); > writer.addDocument(doc); > > writer.close(); > > IndexSearcher searcher = new IndexSearcher(directory); > Query query = new TermQuery(new Term("days", "1")); > TopDocs rs = searcher.search(query, null, 1

Maximum boost factor

2009-01-15 Thread mitu2009
Does anyone know the maximum boost factor value for a field in Lucene? Thanks! -- View this message in context: http://www.nabble.com/Maximum-boost-factor-tp21492116p21492116.html Sent from the Lucene - Java Developer mailing list archive at Nabble.com. ---

RE: Bubbling up newer records

2009-01-15 Thread mitu2009
1-s. Thanks again! Ed Steven A Rowe wrote: > > On 01/14/2009 at 10:44 PM, mitu2009 wrote: >> Is it possible to bubble up newer records in lucene search results? ie.I >> want Lucene to give a higher score to records which are closer to >> today's date. > &

Lucene index updation and performance

2009-01-15 Thread mitu2009
I am working on a job portal site and have been using Lucene for job search functionality. Users will be posting a number jobs on our site on a daily basis.We need to make sure that new job posted is searchable on the site as soon as possible. In this context, how do I update Lucene index when a n

Bubbling up newer records

2009-01-14 Thread mitu2009
Hi, Is it possible to bubble up newer records in lucene search results? ie.I want Lucene to give a higher score to records which are closer to today's date. -- View this message in context: http://www.nabble.com/Bubbling-up-newer-records-tp21470766p21470766.html Sent from the Lucene - Java Deve