lucene

SOLR - how to do a fuzzy search on booleans

If my index contains three boolean fields: a, b and c... I would like to search for: "a=True, b=False, c=True" and SOLR should return all entries, and their score should represent how good the whole query is matched. e.g. a=T, b=F, c=T, score=1.0 a=T, b=T, c=T, score=0.6 a=T, b=T, c=F, score=0.5 is that possible ? ...

Combining Numeric Range Query with Term Query in Lucene

Hi, I would like to combine a numeric range query with a term query in Lucene. For example, I want to search for documents that I have indexed that contain between 10 and 20 pages and have the title "Hello World". It does not seem possibly to use the QueryParser to generate this query for me; the range query that the QueryParser gener...

Store fields in database or in Lucene index file

Hi All, My domain object is pretty simple, only have 20 properties(columns, or fields, whatever you call it) and does not have complex relationship. I need to index 5 of them for full text search and 3 need for sort. There might be 100,000 records. To keep my application simple, I'm thinking store all fields in Lucene index file to avo...

Lucene Indexing and searching

Hi, I am trying to index a table in a database using Lucene. I use Lucene just for indexing, the Fields are not stored. The table mentioned above has five columns (userid (PK), description, report number, reporttype, report). I intend to use a combination of userid, reportnumber and report type for getting data back from the database...

Filtering by date range in Lucene

I know the title might suggest it is a duplicate but I haven't been able to find the answer to this specific issue: I have to filter search results based on a date range. Date of each document is stored (but not indexed) on each one. When using a Filter I noticed the filter is called with all the documents in the index. This means the ...

Is There a way to use Zend Search Lucene in a way similar to Useing the WHERE LIKE sql in Databases ?

$select = $this->_db->select()->from($this->_name,array("id","fullname","username","email"))->where("fullname LIKE '$query%'"); I am using this SQL statement currently to power my Ajax auto suggest, if i type in "a" it gets me results starting with a. I want to know if this can be accomplished my using Zend Lucene indices. ...

Zend_Search_Lucene changing term frequency problem

Hi there, I am trying to update the searching of terms of documents within my Lucene index. Currently the searches score on the number of times the term appears in the document. What I would like to do is score if the term exists, rather than the number of times the term exists. So a document with the term in it once scores the same ...

Show hitted documents in the same series together in Lucene

Hi All, The are some articles are written in several parts, for example, I got those articles from IBM developer works: Distributed data processing with Hadoop, Part 1:Getting started Distributed data processing with Hadoop, Part 2:Going further Distributed data processing with Hadoop, Part 3: Application developm...

Optimize lucene search performance

I have an application that store (title,body) of a news as separate field in lucene document At search time i need to create a query that boost title over body. (title is more important in search) but it slow down the speed of searching. An optimization tip show me that I can combine these two fields into one and It absolutely speed up s...

Lucene : IndexWriter.update - how to form term for searching numeric values

My index has the following fields : ID (type long, indexed, stored, not analyzed), Contents (String, not indexed, not analyzed, stored) and Tags (String, indexed, analyzed, stored). Need to update the Contents for a given ID - how to do that using IndexWriter.update? How do I form the term? If the ID is stored as String I can form the...

Will CompassGps roll back if the transaction is rolled back?

If CompassGps mirroring is used with Hibernate, what happens if the database transaction rolls back? Will the changes to the index be rolled back (assuming file store for the index)? It seems like if the Lucene index is stored on the disk it won't be automatically rolled back, unless Compass is smart enough to handle that for you. FWI...

Custom sorting for lucene

Hi I have document with fields like (title, content, datetime) I want to sort the results with the following formula 1) title boosts 2.5 2) content boost 1.5 3) IMPORTANT (boost those documents that is newer means datetime field is near today date) boost 3 how can I write a query considering the above criteria what should I do for #3...

Storing DateTime field in lucene document

What is the best way to add datefield to a document (i just need YYYYMMDD) Whats the best way to query against datefield Im creating the datefield as the following newDoc.Add(new Field("newsdate", "", Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS)); but it slow down searches when adding a criteria of this field. what should i d...

Lucene IndexWriter slow to add documents

I wrote a small loop which added 10,000 documents into the IndexWriter and it took for ever to do it. Is there another way to index large volumes of documents? I ask because when this goes live it has to load in 15,000 records. The other question is how do I prevent having to load in all the records again when the web application is r...

Scalable freetext & parametric searching (C#)

Hey, Currently, we've got an application that needs to perform very fast searches on ~2 mill records. Searches need to search both a large free-text field, and a number of integer/decimal fields between different ranges, along with various functions/computations & sorting. Currently, we're handling this with a big MSSQL database, usin...

Problem with jQuery autocomplete and lucene

I use jQuery autocomplete in a jsp and get my searchresults from a servlet, where a Lucene Index is searched against the given term that should be autocompleted. Thats the code of the autocomplete in the jsp: $(document).ready(function() { $("#QRY_ItemQuickSearch_enc").autocomplete("<%=autoSuggestAction%>", { onI...

Lucene 3 iterating over all hits

I'm in the process of updating a tool that uses a Lucene index. As part of this update we are moving from Lucene 2.0.0 to 3.0.2. For the most part this has been entirely straightforward. However, in one instance I cant seem to find a straightforward conversion. Basically I have a simple query and I need to iterate over all hits. In Luce...

how to get the stored field of a document by a document id in lucene??

I am trying to combine lucene score with PageRank, I tried to modify the DefaulySimilarity to add the PageRank I already have(in a Array with corresponding URL), but the problem is that I do not know how to get the document field which stored the URL of the document. The termDoc can only return the docID. Or I have another idea is to mod...

How to query lucene with "like" operator?

The wildcard * can only be used at the end of a word, like user*. I want to query with a like %user%, how to do that? ...

Using AND, OR and NOT in Solr Query

HI, I am trying a solr query which is like this +field1:* AND (field2:1 OR field2:10) NOT(field3:value1 OR field3:value2) But field3 part of the query is not making any impact. It still brings record which has value1 or value2 in field3 Why is this ? ...