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

Using Lucene.Net thread-safe from asp.net web application

So I've been doing some research on the best way to implement Lucene.Net index searching and writing from within a web application. I set out with the following requirements: Need to allow concurrent searching and accessing of the index (queries…
Leland Richardson
  • 2,695
  • 2
  • 20
  • 27
10
votes
7 answers

Lucene - Wildcards in phrases

I am currently attempting to use Lucene to search data populated in an index. I can match on exact phrases by enclosing it in brackets (i.e. "Processing Documents"), but cannot get Lucene to find that phrase by doing any sort of "Processing…
Trevor Watson
9
votes
1 answer

Is there any way for me to change scoring based on term position in Lucene?

for example, if I am searching an index of book titles with the term "harry", "Dirty Harry" is scored equally to "Harry Potter", and when two items are equally scored, the order is random. I'd like to weight the one that begins with my search term…
HaterTot
  • 407
  • 8
  • 18
9
votes
2 answers

Getting terms matched in a document when searching using a wildcard search

I am looking for a way to find the terms that matched in the document using waldcard search in Lucene. I used the explainer to try and find the terms but this failed. A portion of the relevant code is below. ScoreDoc[] myHits =…
Puneet
  • 472
  • 3
  • 14
9
votes
1 answer

Lucene.net multi field searches

In an attempt to get some more contextually relevant search results I've decided to have a play with lucene.net although I'm very new to it and I've found it not to be the most intuitive library I've come across. This isn't helped by the lack of…
Hawxby
  • 2,746
  • 21
  • 29
9
votes
2 answers

is it mandatory to optimize the lucene index after write?

Currently i am calling the optimize method of the indexwriter after the completions of the write. Since my data set is huge, it took long time ( and needs more space (2*actual size)) to optimize the index. I am very much concerned about this…
RameshVel
  • 64,778
  • 30
  • 169
  • 213
9
votes
1 answer

Wildcard at the Beginning of a searchterm -Lucene

As far as i know lucene(.net) doesn't support the wildcard at the beginning of a searchterm --> http://lucene.apache.org/java/2_0_0/queryparsersyntax.html "Note: You cannot use a * or ? symbol as the first character of a search." for…
tim
  • 197
  • 1
  • 2
  • 10
9
votes
3 answers

Lucene: Score calculation with a PrefixQuery

I have a problem with the score calculation with a PrefixQuery. To change score of each document, when add document into index, I have used setBoost to change the boost of the document. Then I create PrefixQuery to search, but the result have not…
Keven
  • 111
  • 5
9
votes
1 answer

Lucene.NET - sorting by int

In the latest version of Lucene (or Lucene.NET), what is the proper way to get the search results back in sorted order? I have a document like this: var document = new Lucene.Document(); document.AddField("Text",…
Judah Gabriel Himango
  • 58,906
  • 38
  • 158
  • 212
9
votes
1 answer

Lucene.NET and searching on multiple fields with specific values

I've created an index with various bits of data for each document I've added, each document can differ in it field name. Later on, when I come to search the index I need to query it with exact field/ values - for example: FieldName1 = X AND…
Kieron
  • 26,748
  • 16
  • 78
  • 122
9
votes
2 answers

Lucene search and underscores

When I use Luke to search my Lucene index using a standard analyzer, I can see the field I am searchng for contains values of the form MY_VALUE. When I search for field:"MY_VALUE" however, the query is parsed as field:"my value" Is there a simple…
Matt
  • 25,943
  • 66
  • 198
  • 303
9
votes
3 answers

How to do partial word searches in Lucene.NET?

I have a relatively small index containing around 4,000 locations. Among other things, I'm using it to populate an autocomplete field on a search form. My index contains documents with a Location field containing values like Ohio Dayton, Ohio…
JamieGaines
  • 2,062
  • 1
  • 18
  • 20
9
votes
1 answer

Lucene.NET Search Highlighting that respects HTML Tags

I am trying to highlight search terms in a block of HTML, the problem is if a user does a search for "color", this: White becomes: White and obviously, messing up my…
Adam Greene
9
votes
4 answers

How to: Increase Lucene .net Indexing Speed

I am trying to create an lucene of around 2 million records. The indexing time is around 9 hours. Could you please suggest how to increase performance?
Gokul
  • 163
  • 1
  • 7
9
votes
1 answer

Lucene .net Boost not working when using * wildcard

I have two documents and using Luke to investigate, I have confirmed in code that it has the same behavior, using StandardAnalyzer. Document one with boost 1 stored/uncompressed,indexed,tokenized
JustusTh
  • 183
  • 2
  • 7