Questions tagged [lucene.net]

1

votes
0

answer
133

Views

How to boost certain term (clause) in query in Lucene.NET 4.8

Suppose we have a MoreLikeThis query (or any other existing query) MoreLikeThis mlt = new MoreLikeThis(reader); Query query = mlt.Like(some_document); which looks something like this: field:term1^2.0 field:term2^1.5 field:term3^0.5 What am I trying to do is to change the boost factor value for certa...
MarioKeszeli
1

votes
0

answer
50

Views

Lucene.Net FastVectorHighlighter with fine-grained Chinese segmentation tool doesn't work

enter image description here the error is: System.ArgumentOutOfRangeException: Index and length must refer to a location within the string. Parameter name: length at System.String.Substring(Int32 startIndex, Int32 length) at Lucene.Net.Search.VectorHighlight.BaseFragmentsBuilder.MakeFragment(StringB...
xiaokang
1

votes
0

answer
321

Views

after upgrading to 4.8 from 3.0.3 Lucene Net performance issue

after migrating from 3.0.3 to 4.8, indexing new document is slower than 3.0.3 but index file size much smaller than 3.0.3. here my code private IndexReader reader; private IndexSearcher searcher; var writeconfig = new IndexWriterConfig(Lucene.Net.Util.LuceneVersion.LUCENE_48, analyzer); writer = new...
fuujinnn
1

votes
1

answer
29

Views

Irrelevant search results with lucene.net

I have been developing a search engine for a business directory application using Lucene.net. However when i search for Sports shop it returns the result of other shops including the sports shops because the key word shop matches with that. So how can i prioritize that it should return the results w...
Vishnu PS
1

votes
1

answer
29

Views

Lucene.net search doesn't return names

I am using WhitespaceAnalyzer to index some values. document.AddField('transcript', , Lucene.Net.Documents.Field.Store.YES, Lucene.Net.Documents.Field.Index.ANALYZED); and do a search like follows booleanMiniQuery.Add(new TermQuery(new Term('transcript', )), rule); when contains some names like bai...
e03050
1

votes
1

answer
65

Views

Lucene.Net.Replicator how to use sample example

is there any way to replicate lucene.net indexes? I found this package in nuget 'Lucene.Net.Replicator -Version 4.8.0-beta00005 '. It seems it will work with Lucene.Net 4.8. But I don't have idea on how to use.
venkat.bommina
1

votes
1

answer
60

Views

Why doesnt lucene return results

I use lucene.net to index the documents. My main aim was to get to search and have the line number and the line of text returned in a document. Here's the code that indexes using (TextReader contentsReader = new StreamReader(fi.FullName)) { doc.Add(new StringField('FullFileName', fi.FullName, Fiel...
Eminem
1

votes
0

answer
108

Views

Index was outside the bounds of the array while using Lucene.NET

I am using Lucene.net version 3 library to index the data and search on them but for some reason, sometimes it throws a weird error message internally and I can not even understand why this happens. Below is my code when I try to search on the index: using (var analyzer = new StandardAnalyzer(Versio...
Rajmond Burgaj
1

votes
5

answer
2.6k

Views

How to sort by Lucene.Net field and ignore common stop words such as 'a' and 'the'?

I've found how to sort query results by a given field in a Lucene.Net index instead of by score; all it takes is a field that is indexed but not tokenized. However, what I haven't been able to figure out is how to sort that field while ignoring stop words such as 'a' and 'the', so that the following...
Peaeater
1

votes
2

answer
2.7k

Views

Using Highlighter for highlighting Phrase query

Am using this version of Lucene highlighter.net API. I want to get a phrase highlighted only when ALL of its words are present in the search results..But,am not able to do so....for example, if my input search string is 'Leading telecom company', then the API only highlights 'telecom' in the result...
Jeremy Thomson
1

votes
2

answer
776

Views

What should go in my Lucene document?

I use Lucene.net to index content and documents etc.. on our CMS. This has worked well so far, but now I've got to take account of the following additions to web pages: Publish date Expiry date Page 'is active' User authorisation So the search results should only show pages that are within the Publi...
Nick
1

votes
1

answer
1.1k

Views

How to make the field name case incensitive in an nhibernate.search query

I would like to make the field name in my query case incesitive so that when users make the queries title:Jurassic or Title:Jurassic NHibernate Search would yield the same result. As I understand the way Lucene works field names are case sensitive. Is there a way to configure NH Search/Lucene to low...
Simon Laroche
1

votes
1

answer
163

Views

Searching and sorting by language

I am testing Lucene.NET for our searching requirements, and I've got couple of questions. We have documents in XML format. Every document contains multi-language text. The number of languages and the languages itself vary from document to document. See example below: This is a sample document, which...
rrejc
1

votes
1

answer
647

Views

Lucene.NET indexes are not updating when dealing with many-to-many relationships using NHibernate.Search

I have integrated NHibernate.Search into my web app by following tutorials from the following sources: NHibernate.Search using Lucene.NET Full Text Index (Part 1) Using NHibernate.Search with ActiveRecord I have also successfully batch-indexed my database, and when testing against Luke, I can search...
sgtsunshine
1

votes
2

answer
725

Views

SQl Server 2008 FILESTREAM, Indexing Services, and FTS

I need to implement a service to search PDFs. Initially I started using SQL Server 2008 FTS, but soon realized that my PDFs would have to be stored in the DB itself. I was then pointed to Indexing Services as well as to the SQL 2008 FILESTREAM data type so that I can store PDFs in the file system....
Prabhu
1

votes
2

answer
592

Views

Inflectional forms of verbs using DBsight lucene?

I know dbsight allows synonyms and stop words for searching but does this take care of inflectional forms of a verb too e.g. for 'swim' it should find swim, swims, swimming, swam, and swum Link on DBSight Wiki : http://wiki.dbsight.com/index.php?title=User_dictionary
Yasir Laghari
1

votes
1

answer
242

Views

Trouble searching for acronyms in Lucene.NET

I'm currently working on a Lucene.NET full-text search implementation. For the most part it's going quite well but I'm having a few issues revolving around acronyms in the data... As an example of what's going on if I had 'N.A.S.A.' in the field I indexed I'm able to match it with n.a.s.a. or nasa,...
fyjham
1

votes
1

answer
574

Views

Lucene .NET 2.3.2 Security Exception - Medium trust Issues

I'm only partially able to get Lucene .NET to work on GoDaddy. It throws a security exception on this line: Hits hits = searcher.Search(query, filter); Here are the details of this exception: Description: The application attempted to perform an operation not allowed by the security policy. To gran...
Prabhu
1

votes
1

answer
284

Views

Twin Lucene index directories after Nhibernate.Search upgrade

i've been busy upgrading our n* stack to a more recent version. We'd been using FluentNhibernate for configuration and Nhibernate.search coupled with Lucene.Net for full-text search. Everything worked fine until i changed the various versions of the libraries to the following: FluentNHibernate.dll:...
samy
1

votes
1

answer
338

Views

Where do I download a version of Lucene.net?

The link, http://incubator.apache.org/lucene.net/ contains a download link named Lucene.Net source, but the Lucene directory in the repository only leads back to itself. Does any one know where I can download the source so I can compile a version 2.4 dll?
kirk.burleson
1

votes
2

answer
894

Views

Lucene.Net support phrases?: What is best approach to tokenize comma-delimited data (atomically) in fields during indexing?

I have a database with a column I wish to index that has comma-delimited names, e.g., User.FullNameList = 'Helen Ready, Phil Collins, Brad Paisley' I prefer to tokenize each name atomically (name as a whole searchable entity). What is the best approach for this? Did I miss a simple option to set the...
Pete Alvin
1

votes
3

answer
1.5k

Views

Distributed Lucene.NET

I have a Terabyte of data, maybe more, which I'd like to index and search with Lucene. I'd like to be able to split the index out to different machines, similar to what Solr does (if I understand Solr correctly). Are there any existing tools to do this on the Windows platform? Thanks! Edit: I'm not...
Rabbit
1

votes
1

answer
1.8k

Views

Lucene - How to index a value with special characters

I have a value I am trying to index that looks like this: Test (Test) Using a StandardAnalyzer, I attempted to add it to my document using: Field.Store.YES, Field.Index.TOKENIZED When I do a search with the value of 'Test (Test)' my QueryParser generates the following tags: +Name:test +Name:test Thi...
Brandon
1

votes
1

answer
474

Views

Lucene adding additional filter returns no results

I am attempting query some results using a Boolean Query. However the query does not return any results. Here is the FilterQuery I am running. This returns no results, even though the field foo contains bar, and the field foo3 contains bar3. And I have triple checked my fields to make sure that the...
Aaron M
1

votes
1

answer
600

Views

Lucene behaviour in mocked unit tests

Now this is just strange: The code as it is below works fine in a NUnit unit test with RhinoMocks (the assert passes). This is creating an IndexSearcher in the code. Now if I use the mocked version of Get (swap the commented assignment of IndexSearcher) so now the searcher is returned by the mock,...
Khash
1

votes
1

answer
180

Views

How efficient is this parallelisation code? Is there a better way to do it?

I'm building a large Lucene index and each document I insert requires a little bit of 'putting together' before it can be inserted. I'm reading all of the documents from a database and inserting them into the index. Lucene allows you to build a few different indexes and merge them together later, so...
Nathan Ridley
1

votes
3

answer
149

Views

Lucene/Solr Searching problem?

I have a problem that i want to search in the specific locations in the indexed text, let we have a lucene document that contains text as This document contains following items 1. Business overview. 2. Risk Factors. 3. Management our business is xyz we have xyz risk factors we have xyz type of man...
Ahsan Iqbal
1

votes
1

answer
257

Views

ASP.NET search indexing building strategy

This is what I'm planning to do and I'd appreciate anyone's input: I've built a forum in Asp.net MVC and now want to add Lucene.Net for search. My plan is to run an index builder thread every 5-10 minutes to update the search index with the changes made to the each discussion. The way it will work...
Roman
1

votes
3

answer
1.2k

Views

Lucene.NET: Query or Filter?

It is my understanding that documents are found based on a query, and then that result is then filtered by the filter. The Query is the only that that will effect the score/relevance of a document. Would there be any performance (caching) improvements if I query results that have relevance towards r...
Paul Knopf
1

votes
2

answer
1.4k

Views

Iterate through all undeleted Documents in a Lucene (.Net) index

I want to get the count of all un-deleted documents of a Lucene (.Net 2.4) index and then read my stored fields of all or a range of these docs. After reading the Lucene help I'm not quite sure, whether IndexReader.NumDocs() returns the count of all docs or only the undeleted ones. Can I simply ite...
gumo
1

votes
2

answer
1.4k

Views

Extract terms from query for highlighting

I'm extracting terms from the query calling ExtractTerms() on the Query object that I get as the result of QueryParser.Parse(). I get a HashTable, but each item present as: Key - term:term Value - term:term Why are the key and the value the same? And more why is term value duplicated and separated b...
slo2ols
1

votes
2

answer
194

Views

Make Lucene index a value and store another

I want Lucene.NET to store a value while indexing a modified, stripped-down version of the stored value. e.g. Consider the value: this_example-has some/weird (chars) 100% I want it stored right like that (so that I can retrieve exactly that for showing in the results list), but I want lucene to inde...
Phillippe Santana
1

votes
1

answer
2k

Views

Sitecore Lucene index directory exists, but no segments files

Following the instructions in this SDN document (PDF), I added a custom Lucene index to a Sitecore 6.3 website (or so I thought): In the section in web.config, I added my index definition: ... $(id) __created @name body @tid @id I added the index to the master database: ... ... Since the master dat...
1

votes
1

answer
719

Views

Each time Lucene indexing is running it's getting slower and slower

This code tests indexing with Lucene.NET. for (int i = 0; i < 10; i++) { var stopwatch = Stopwatch.StartNew(); string indexPath = Path.Combine('C:\\lucene\\'); var directory = FSDirectory.Open(new DirectoryInfo(indexPath)); var analyzer = new StandardAnalyzer(LuceneConfiguration.Version); IndexWrite...
Allrameest
1

votes
1

answer
540

Views

lucene 3.0.3 | QueryParser

I have created my own custom analyzer made them search for c#, .net, c++ etc. While I am trying to search c#, .net, c++ QueryParser parse .net to .net and C++ to C++. So it works fine. But in case of C# QueryParser parse it to C which makes trouble for me. Also tried to use MultiFieldQueryParser but...
ranjit
1

votes
2

answer
975

Views

How to remove hyphen token in lucene.net

I'm having problem with hyphen when searching. I thinks its because of the Standard Analyzer that I use so my question now is how to remove that hypen as part of the standard analyzer token. pls. help! :(
mingzcky
1

votes
1

answer
614

Views

How can I perform a fuzzy search for all words provided in a Lucene.net search

I am trying to teach myself Lucene.Net to implement on my site. I understand how to do almost everything I need except for one issue. I am trying to figure out how to allow a fuzzy search for all search terms in a search string. So for example if I have a document with the string The big red fox,...
KallDrexx
1

votes
1

answer
1.9k

Views

Autosuggest / Autocomplete with multiple indexes and Lucene.Net?

Does anyone have any suggestions when it comes to building an Autosuggestion / Autocomplete search on multiple indexes? Update: I found this link that may be how I need to approach my solution.
DDiVita
1

votes
1

answer
238

Views

highlighting a text without using original text in lucene.net?

How can I highlight my searched text without using the original text in lucene.net? I just want to used an index and the text is indexed by using the field termvector with postion offsets?
Yogs
1

votes
1

answer
327

Views

What happens during Commit while using Lucene NRT

We're using Lucene.NET 2.9.2, and would like to move over to the Near Realtime functionality of Lucene. We get the IndexReader from the IndexWriter (thus using NRT). My understanding is that when using it this way, the IndexReader will also contain search results of those documents that have been ad...
Gidon

View additional questions