Questions tagged [lucene.net]

Lucene.NET is a source code, class-per-class, API-per-API, algorithmic port of the Java Lucene search engine to the C# and .NET platform utilizing the Microsoft .NET Framework and .NET Standard. NOTE: You should almost always include the [lucene] tag when using this one. The Lucene.NET design is similar to its Java counterpart and you are more likely to get a satisfactory answer when it is included.

1845 questions
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
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
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
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
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
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

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
21
votes
3 answers

How to search across all the fields?

In Lucene, we can use TermQuery to search a text with a field. I am wondering how to search a keyword across a bunch of fields or all the searchable fields?
Adam Lee
  • 24,710
  • 51
  • 156
  • 236
21
votes
3 answers

Infamous: Invalid index n for this SqlParameterCollection with Count=

This exception: Invalid index n for this SqlParameterCollection with Count= Usually points at duplicate mapping information (see Stack Overflow + Google). I am pretty sure I have none. Are there any other reasons for it? I seem to have identified…
cs0815
  • 16,751
  • 45
  • 136
  • 299
21
votes
6 answers

How to identify if a Lucene.Net Index exists in a folder?

I am using Lucene.Net for indexing and searching documents, and I am using the following code to create or open an index if one exists: IndexWriter writer = new IndexWriter(@"C:\index", new StandardAnalyzer(), !IndexExists); ... private bool…
19
votes
3 answers

Looking for an example of using Lucene.net with ASP.NET

How do you implement the search capabilities of Lucene.net in asp.net? If possible, please include links or example code.
Avinash
  • 3,231
  • 10
  • 36
  • 46
18
votes
2 answers

Howto perform a 'contains' search rather than 'starts with' using Lucene.Net

We use Lucene.NET to implement a full text search on a clients website. The search itself works already but we now want to implement a modification. Currently all terms get appended a * which leads Lucene to perform what I would classify as a…
ntziolis
  • 10,091
  • 1
  • 34
  • 50
18
votes
2 answers

How to get total number of potential results in Lucene

I'm using lucene on a site of mine and I want to show the total result count from a query, for example: Showing results x to y of z But I can't find any method which will return me the total number of potential results. I can only seem to find…
Aaron Powell
  • 24,927
  • 18
  • 98
  • 150
17
votes
1 answer

Lucene Returning Documents with non positive score

We have recently upgraded a CMS we work on and had to move from Lucene.net V2.3.1.301 to V2.9.4.1 We used a CustomScoreQuery in our original solution which did various filtering that couldn't be achieved with the built in queries. (GEO, Multi Date…
Ettienne
  • 365
  • 3
  • 9
17
votes
4 answers

How to secure/encrypt a Lucene index?

I am working on a desktop app that will use Lucerne as search engine. The app will be installed on the user's machine and the index will be stored on the local hard disk. The data is potentially confidential so I would like to protect the index…
user46703
  • 351
  • 4
  • 9