lucene

How do I use native Lucene Query Syntax?

I read that Lucene has an internal query language where one specifies : and you make combinations of these using boolean operators. I read all about it on their website and it works just fine in LUKE, I can do things like field1:value1 AND field2:value2 and it will return seemingly correct results. My problem is how do I pass this w...

How to improve asp.net AJAX autocomplete performance

My web site has city,state and zip code autocomplete feature. If user types in 3 characters of a city in the textbox, then top 20 cities starting with those characters are shown. As of now, Autocomplete method in our application queries sql 2005 database which has got around 900,000 records related to city,state and zip. But the respo...

Multiple-index searching in Lucene (hibernate search)

Official Lucene Feautures site states that lucene supports "multiple-index searching with merged results". Is it possible to do this with hibernate search somehow? My usecase: Aricle with Comments. I want to have two separate indices: one for articles and one for comments. I want to be able to find article also by match in one of comm...

How to match search strings to content in python

Usually when we search, we have a list of stories, we provide a search string, and expect back a list of results where the given search strings matches the story. What i am looking to do, is the opposite. Give a list of search strings, and one story and find out which search strings match to that story. Now this could be done with re b...

Searching for multiple terms in a field

I want to do an AND query, say 'foo AND bar', in Lucene.NET. I have a WholeIndex field which has the whole document indexed, and I want Lucene to search in the whole document. Up to here it's quite easy, but there's a constraint. I want both terms 'foo' and 'bar' to be in the same field. Is there an easy way to do this without querying...

lucene / python

Can I use lucene directly from python, preferably without using a binary module? I am interested mainly in read access -- being able to perform queries from python over existing lucene indexes. ...

Lucene AddIndexes (merge) - how to avoid duplicates?

How do I make sure that when I merge a few temp indexes (that might or might not contain duplicate documents) I end up with one copy in the main index ? Thanks ...

Google Search, FAST ESP and Lucene

Has anybody come across or created a functionality comparison document between the various enterprise search options like Google Search Appliance, Fast ESP, Lucene? Any helpful pointers or links much appreciated. ...

Lucene.Net and I/O Threading issue

Hello all, I have an indexing function named "Execute()" using IndexWriter to index my site's content. It works great if I simply called it from a web page, but failed when I have it as a delegate parameter into System.Threading.Thread. Strangely though, it always work on my local dev machine, it only fails when I uploads to a shared ho...

Hibernate - Lucene Search: cannot determine sort type

Hi all, I am using Hibernate - Lucene Search. I have the following Runtime Exception while sorting when no data available in index file/table. This is my code: .......... .......... query.setFirstResult(startIndex); query.setMaxResults(displayCount); Sort sort = null; SortField sortField = new SortField...

Full Text Searching with Rails

Hi all, I've been looking into searching plugins/gems for Rails. Most of the articles compare Ferret (Lucene) to Ultrasphinx or possibly Thinking Sphinx, but none that talk about SearchLogic. Does anyone have any clues as to how that one compares? What do you use, and how does it perform? ...

JPA HibernateSearch Projections

I'm trying to use JPA with HibernateSearch. I used Example 5.3 in http://docs.jboss.org/hibernate/stable/search/reference/en/html/search-query.html. The results come out as expected. However, the data coming back is a huge graph. I only need the primary key of the data. So, I tried Example 5.9, but it only shows the Hibernate API. ...

How to Take Taking online Hot Backup of lucene FileDirecotry index?

Hi, I am thinking of adding JMX bean for taking hot backup of lucene index. LuceneMBean mbean = new LuceneMBeanImpl(); ObjectName name = new ObjectName("indexing.index:type=lucene"); MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); mbs.registerMBean(mbean, name); LuceneMBean will have method called backupIndex(St...

Lucene multiple indexes : Normalize document scores??

Hi All. Suppose I've got multiple lucene indexes (not replicas) on several PC's. I query each index and then merge the results. Is there any way to normalize the document scores so that I could sort by score (relevance)? I mean, the scores for document A from index A would not be comparable with document B from index B, unless I do s...

Ranking using Geographic Location in Solr

What is the correct way to implement a custom ranking algorithm for Solr/Lucene? I read about Zvents implementing a Distance Weighting ranking system for documents which correspond to events in a specific geographic area (http://www.lucidimagination.com/Community/Hear-from-the-Experts/Articles/Zvents). I would like to do something simi...

Error while copying Lucene index

I've an asp.net web application which uses Lucene API for search. Here is the problem scenario: Events: User invokes a Lucene search query thru the web application. There is another windows service running which just copies the search index folder to another folder. When event 2 occurs after event 1 has occurred, I am getting error ...

Can I use the same instance of IndexSearcher in Lucene.Net by multiple threads concurrently?

I want to be able to search by multiple clients and index at the same time in Lucene.Net Is it possible and thread safe? Can the same instance of IndexSearcher be shared across threads? ...

Preserving dots of an acronym while indexing in Lucene

Hi, If i want Lucene to preserve dots of acronyms(example: U.K,U.S.A. etc), which analyzer do i need to use and how? I also want to input a set of stop words to Lucene while doing this. ...

How to implement custom search result ranking?

My lucene index contains documents with the field "itemName". This field is boosted with a boost factor between 0 and 1. When i create a BooleanQuery i'd like that the results are ranked by the count of matched clauses and the boostfactor, so the formula looks like: score = (count_of_matching_clauses / count_of_total_clauses + boost_fac...

Newbie to Lucene.net, best aproach to complex queries?

Hi, I'm building a website for learning pruposes and i'm looking at lucene.net as a full text indexer for my content but I have some questions. Lets say I have a hierarchy (n levels) of categories, and articles that are assigned to one category (1 cat -> n articles). Using a simple RDB would be very easy to search for an article under ...