lucene

Document score

Hi, I'm trying to read document score of lucene search results. I get a set of document scores through the hits object when I use the following method : Hits hits = IndexSearcher.search(myQuery); However,if i use the method: searcher.search(myQuery, hitsCollector); I get a totally different set of document scores through the hitColle...

PhraseQuery not working

Hi, How do i get PhraseQuery working in Lucene? Am using standard analyzer. Thanks! ...

Bubbling up newest content in lucene search results

Hi, I am storing various articles in my lucene index. When user searches for articles which contain a specific term or phrase,I need to show all th articles (could be anywhere between 1000 to 10000 articles) but with newest articles "bubbled up" in the search results. I believe you can bubble up a search result in Lucene using "Date fi...

Optimizing search query

Hi, I'm working on a web application which uses Lucene.net(version 2.0.0.4) for store search. Though my web application user can search for stores in the US which are located within 50 miles from a given location. I'm using a third party API to find all the cities within a radius.For a city say Edison,NJ, it gives me around 450 cities w...

Field having multiple distinct values

Am building a "Book search" API using Lucene. I need to index Book Name,Author, and Book category fields in Lucene index. A single book can fall under multiple distinct book categories...for example: BookName1 --fiction,humour,philosophy. BookName1 --fiction,science. BookName1 --humour,business. BookName4-humour and so on..... User s...

Need Lucene query optimization advice

Hi there, Am working on web based Job search application using Lucene.User on my site can search for jobs which are within a radius of 100 miles from say "Boston,MA" or any other location. Also, I need to show the search results sorted by "relevance"(ie. Score returned by lucene) in descending order. I'm using a 3rd party API to fetc...

Sorting results when using HitCollector

Hi, I'm executing lucene query using the statement because I need to have GroupBy functionality which I'm getting using TermFreqVectors. searcher.Search(finalQuery, collector); (line 1) How do I sort these search results based on a field? I find the order of search results using this query is different from the order got using: Hits h...

nHibrnate.Search with nHibernate v2

Hi I having trouble getting nHibernate.Search to create an Index. If I use 1.2.1.4 of nHibernate.dll & nHibernate.Search.dll then the index is created correctly and I can inspect it with Luke (a Lucene utility). A segments file is created as well as a Fragments file etc However, when I use v 2 of nHibernate.dll & nHibernate.Search.dll...

All of these words feature

Hi, I have a "description" field indexed in Lucene.This field contains a book's description. How do i achieve "All of these words" functionality on this field using BooleanQuery class? For example if a user types in "top selling book" then it should return books which have all of these words in its description. Thanks! ...

Searching for exact phrase

Hi, How do i achieve "Exact Phrase" functionality on this field using BooleanQuery/any other class? For example if a user types in "top selling book" then it should return books which has this phrase in its description. Thanks again! ...

Is there a pure Python Lucene?

The ruby folks have Ferret. Someone know of any similar initiative for Python? We're using PyLucene at current, but I'd like to investigate moving to pure Python searching. ...

Finding the number of documents in a lucene index

Using Java how would you find out the number of documents in an lucene index? ...

Lucene index updation and performance

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 new job is posted or when an existing job ...

How to make Lucene match all words in query?

I am using Lucene to allow a user to search for words in a large number of documents. Lucene seems to default to returning all documents containing any of the words entered. Is it possible to change this behaviour? I know that '+' can be use to force a term to be included but I would like to make that the default action. Ideally I woul...

acts_as_solr returns all rows in the database when using the model as search query

In our application we're using acts_as_solr for search. Everything seems to be running smoothly except for the fact that using the model name as the search query returns every single row in the table. For example, let's say we have a users table. We specify acts_as_solr in our model to search the fields first name, last name and hand...

PostgreSQL full-text search vs. NHibernate.Search via Lucene.Net

I am considering whether to choose NHibernate.Search or PostgreSQL's embedded full-text search support for my current project. We are using, as you have already guessed, PostgreSQL RDBMS with NHibernate ORM on the .NET platform. What experience have you on above mentioned full-text engines? Is there any pitfalls I should be aware of? ...

Lucene Sentence Search

Is it possible to search for a phrase of the kind Searching is fun, in Lucene? When I try to search with this, Lucene ends up looking for the word fun alone. ...

Leading wildcard character throws error in Lucene.NET.

If the search query contains a leading wildcard character (* or ?), the QueryParser's Parse function throws an error. Dim q As String = "*abc" Dim qp As New QueryParser("text", New StandardAnalyzer()) Dim query As Query = qp.Parse(q) Is there any way to solve this problem in Lucene.NET v2.0.0.4? ...

[LUCENE.NET] How to incorporate multiple fields in QueryParser?

Dim qp1 As New QueryParser("filename", New StandardAnalyzer()) Dim qp2 As New QueryParser("filetext", New StandardAnalyzer()) . . Instead of creating 2 separate QueryParser objects and using them to obtain 2 Hits objects, is it possible perform a search on both fields using a single QueryParser object, so that I have only on Hits objec...

How to update a Lucene.NET index?

I'm developing a Desktop Search Engine in Visual Basic 9 (VS2008) using Lucene.NET (v2.0). I use the following code to initialize the IndexWriter Private writer As IndexWriter writer = New IndexWriter(indexDirectory, New StandardAnalyzer(), False) writer.SetUseCompoundFile(True) If I select the same document folder (containing file...