Questions tagged [lucene]

The term Lucene refers to the open source Java fulltext search engine library, but also to the entire eco-system that grew around it, including lucene.net, solr, elasticsearch and zend-search-lucene.

The term "Lucene" refers to the open source Java fulltext search engine library, and also to the entire eco-system that grew around it, including , , and . "Lucene" may also be used to refer to top-level projects like Nutch and Tika which were once sub-projects of Lucene.

Use the "Lucene" tag if either:

  • The question is about the Java library
  • The question is about a port of the library, but would make sense to people who know the Java library (many Lucene.NET questions match this criteria).
  • The question is so general it doesn't apply to a specific implementation (example).

References:

Basic Demo:

A basic "getting started" demo showing how to build and query an index is provided as part of the official documentation:

Basic Demo documentation - (this link is for Lucene v8.7.0. Newer versions may be available)

Links to the demo's source files are provided in the above documentation.

The source code can also be found here on GitHub.

Luke - a Lucene GUI Client:

Luke is a GUI client application which can be used to explore your Lucene indexes. Recent versions of Luke are now provided as part of each binary release, which can be downloaded from here.

After downloading the binary release, unzip it, and go to the luke directory. Launch the client using the provided luke.bat or luke.sh scripts.

11993 questions
25
votes
4 answers

Solr Partial And Full String Match

I am trying to allow searches on partial strings in Solr so if someone searched for "ppopota" they'd get the same result as if they searched for "hippopotamus." I read the documentation up and down and feel like I have exhausted my options. So far I…
Scripthead
  • 271
  • 1
  • 3
  • 4
25
votes
3 answers

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…
user40907
  • 1,532
  • 5
  • 24
  • 33
25
votes
2 answers

How to perform a lucene query containing special character using QueryParser?

Here is the thing. I have a term stored in the index, which contains special character, such as '-', the simplest code is like this: Document doc = new Document(); doc.add(new TextField("message", "1111-2222-3333", Field.Store.YES,…
Yuanchao Tang
  • 251
  • 1
  • 3
  • 4
25
votes
1 answer

What is the default list of stopwords used in Lucene's StopFilter?

Lucene have a default stopfilter (http://lucene.apache.org/core/4_0_0/analyzers-common/org/apache/lucene/analysis/core/StopFilter.html), does anyone know which are words in the list?
alvas
  • 115,346
  • 109
  • 446
  • 738
24
votes
3 answers

How to write a solr query for retrieving all records with numeric field value less then specified?

Let's assume we have a set of mp3-players with names and prices. How to write a correct solr query for finding all goods with a certain name and with price less then 100$? q = "(name:(ipod) AND price ???? 100.0)"
Roman
  • 64,384
  • 92
  • 238
  • 332
24
votes
4 answers

Optimizing Lucene performance

What are the various ways of optimizing Lucene performance? Shall I use caching API to store my lucene search query so that I save on the overhead of building the query again?
user40907
  • 1,532
  • 5
  • 24
  • 33
24
votes
2 answers

Lucene Field.Store.YES versus Field.Store.NO

Will someone please explain under what circumstance I may use Field.Store.NO instead of Field.Store.YES? I am extremely new to Lucene. And I am trying to create a document. Per my basic knowledge, I am doing doc.add(new…
Katedral Pillon
  • 14,534
  • 25
  • 99
  • 199
24
votes
3 answers

Different analyzers for each field

How can I enable different analyzers for each field in a document I'm indexing with Lucene? Example: RAMDirectory dir = new RAMDirectory(); IndexWriter iw = new IndexWriter(dir, new…
Rabbit
  • 1,741
  • 2
  • 18
  • 27
24
votes
5 answers

Solr Query - HTTP error 404 undefined field text

I've got a Solr instance running on my Ubuntu machine using the default Jetty server that the Solr download comes with. Whenever I start Solr using java -jar start.jar The server starts fine but there is always an exception thrown: INFO:…
Jarrod Nettles
  • 6,193
  • 6
  • 28
  • 46
23
votes
3 answers

Lucene Standard Analyzer vs Snowball

Just getting started with Lucene.Net. I indexed 100,000 rows using standard analyzer, ran some test queries, and noticed plural queries don't return results if the original term was singular. I understand snowball analyzer adds stemming support,…
alchemical
  • 13,559
  • 23
  • 83
  • 110
23
votes
5 answers

Elasticsearch Delete Mapping Property

I am trying to figure out an approach to delete all entries for a specific property in an elasticsearch index and remove all type mappings for that property. I have been looking at the following two doc pages: put mapping and delete mapping From…
Ryan R.
  • 2,478
  • 5
  • 27
  • 48
23
votes
5 answers

figuring out reason for maxClauseCount is set to 1024 error

I've two sets of search indexes. TestIndex (used in our test environment) and ProdIndex(used in PRODUCTION environment). Lucene search query: +date:[20090410184806 TO 20091007184806] works fine for test index but gives this error message for Prod…
Ed.
  • 1,654
  • 7
  • 20
  • 33
23
votes
3 answers

elasticsearch - Return the tokens of a field

How can I have the tokens of a particular field returned in the result For example, A GET request curl -XGET 'http://localhost:9200/twitter/tweet/1' returns { "_index" : "twitter", "_type" : "tweet", "_id" : "1", "_source" : { …
Kennedy
  • 2,146
  • 6
  • 31
  • 44
23
votes
1 answer

Is Solr 4.0 capable of using 'join" for multiple core?

I notice Solr 4.0 has introduced 'join' feature for documents having relationships. this is great, however, I notice examples given by http://wiki.apache.org/solr/Join are for single core which all documents are in single index. Does anybody know if…
zx_wing
  • 1,918
  • 3
  • 26
  • 39
23
votes
3 answers

How to query lucene for empty fields?

I want in 2nd part of my query to have a list of result for while data not null. I find how do it in solr but not in lucene. Anyone have a idea Thanks String : ( field_one:search AND field_two:3000) OR (field_three:search AND field_two:3000 AND…
Jonathan Ilambo
  • 329
  • 1
  • 3
  • 13