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
29
votes
1 answer

ElasticSearch Analyzer and Tokenizer for Emails

I could not find a perfect solution either in Google or ES for the following situation, hope someone could help here. Suppose there are five email addresses stored under field "email": 1. {"email": "john.doe@gmail.com"} 2. {"email":…
LYu
  • 2,316
  • 4
  • 21
  • 38
28
votes
3 answers

Lucene: What is the difference between Query and Filter

Lucene query vs filter? They both does similar things like termquery filters by term value, filter i guess is there for similar purpose. When would you use filter and when query? Just starting on lucene today so trying to clear concept
mamu
  • 12,184
  • 19
  • 69
  • 92
28
votes
4 answers

"Did you mean?" feature in Lucene.net

Can someone please let me know how do I implement "Did you mean" feature in Lucene.net? Thanks!
user40907
  • 1,532
  • 5
  • 24
  • 33
28
votes
1 answer

Elasticsearch - combining query_string and bool query in filter

Is it possible to combine query_string and bool query in filter query? For Example - { "filter": { "query_string": { "query": "field:text" } }, "bool": { "should": { "match": { "field": "text" } } …
Deepak
  • 501
  • 1
  • 5
  • 15
28
votes
4 answers

Can a raw Lucene index be loaded by Solr?

Some colleagues of mine have a large Java web app that uses a search system built with Lucene Java. What I'd like to do is have a nice HTTP-based API to access those existing search indexes. I've used Nutch before and really liked how simple the…
mw542
28
votes
3 answers

Concurrency in Lucene.NET.

I want to use Lucene.NET for fulltext search shared between two apps: one is an ASP.NET MVC application and the other one is a console application. Both applications are supposed to search and update index. How the concurrency should be handled? I…
Eugeniu Torica
  • 7,484
  • 12
  • 47
  • 62
28
votes
2 answers

Which special characters need escaping in a solr query?

Update: I think this question has to do with solr syntax in general, and not Chef in particular. So while I ran into this working with Chef, I presume that anyone working with Solr will also experience this... I'm working on an application that…
hairyhenderson
  • 577
  • 1
  • 7
  • 20
28
votes
6 answers

Lucene with PHP

Can I use Lucene with PHP ? I don't want to use Zend. Can I use in native PHP (not framework) ?
saturngod
  • 24,649
  • 17
  • 62
  • 87
27
votes
2 answers

Proper structuring of Lucene.Net usage in an ASP.NET MVC site

I'm building an ASP.NET MVC site where I plan to use Lucene.Net. I've envisioned a way to structure the usage of Lucene, but not sure whether my planned architecture is OK and efficient. My Plan: On Application_Start event in Global.asax: I check…
Maxim Zaslavsky
  • 17,787
  • 30
  • 107
  • 173
27
votes
2 answers

nested vs object in Elasticsearch

Can someone explain what is a difference between "object" and "nested" fields in documents in Elasticsearch? I know by default field is defined as object. I also know that I can access object field with a dot like this: my_field.name,…
TroodoN-Mike
  • 15,687
  • 15
  • 55
  • 78
26
votes
3 answers

how to achieve pagination in lucene?

Wondering how to achieve pagination in Lucene, as it does not inherently support pagination. I basically need to search for 'top 10 entries' (based on some parameter) then 'next 10 entries' and so on. And at the same time I don't want Lucene to hog…
nvsreeram
  • 263
  • 1
  • 3
  • 5
26
votes
3 answers

What are some good resources on using Lucene.Net?

Does anyone know where I can find out more information on Lucene.Net? I am looking for a tutorial or videos on how to use Lucene.Net that stack overflow users can personally recommend.
Ti.
  • 303
  • 3
  • 8
26
votes
8 answers

Lucene not null query?

How can we construct a query to search for particular field to be not null? field_name:* is not working. I tried field_name:[a* to z*] this works fine for English, but does not cover all languages. Any alternative suggestions?
Chandra
  • 777
  • 3
  • 12
  • 18
26
votes
3 answers

What are docValues in Solr? When should I use them?

So, I have read multiple sources that try to explain what 'docValues' are in Solr, but I don't seem to understand when I should use them, especially in relation to indexed vs stored fields. Can anyone please throw some light on it?
gravetii
  • 9,273
  • 9
  • 56
  • 75
26
votes
5 answers

Is it possible to iterate through documents stored in Lucene Index?

I have some documents stored in a Lucene index with a docId field. I want to get all docIds stored in the index. There is also a problem. Number of documents is about 300 000 so I would prefer to get this docIds in chunks of size 500. Is it possible…
Eugeniu Torica
  • 7,484
  • 12
  • 47
  • 62