lucene.net

How to sort by a field that has an alternative value if null in lucene?

ⅰ亾dé卋堺 提交于 2019-12-11 13:57:42
问题 I want to sort my lucene(.net) search results by a date field (date1), but if date1 is not set, I'd like to use date2. The traditional sort method is to sort by date1, and then sort the values that are the same by date 2. This would mean that whenever I did fall back to date2, these values would be at the top (or bottom) of the result set. I'd like to interleave the date2 values with the date1 values. In other words, I want to sort on (date1 != null ? date1 : date2). Is this possible in

Lucene.Net range subquery not returning expected results (RavenDB related)

妖精的绣舞 提交于 2019-12-11 12:52:38
问题 I'm trying to write a lucene query to filter some data in RavenDB. Some of the documents in this specific collection are assigned a sequential number, and the valid ranges are not continuous (for example, one range can be from 100-200 and another from 1000 to 1400). I want to query RavenDB using Raven Studio (v2.5, the Silverlight client) to retrieve all documents that have values outside of these user-defined ranges. This is the overly simplified document structure: { ExternalId: something/1

Lucene.Net Index all files in a folder

不羁岁月 提交于 2019-12-11 11:56:38
问题 Is there a way to index all files in a specific folder? Refer to a folder, and somehow add all the documents in the folder to the index without having to loop through all the files in the folder. In DtSearch, there was a method to "IndexFilesInFolder(foldername)" 回答1: There's a demo directory in the Lucene.Net source which includes examples how to index all files in a folder, and searches the index. It works for basic text documents, you'll need to handle other document types to extract their

Sitecore 7 highlight search results

感情迁移 提交于 2019-12-11 11:54:01
问题 I am working on the upgrade of a project from Sitecore 6.2 to Sitecore 7. I have found out that in Sitecore 6.2, the highlighting of the search results are implemented with the Lucene.Net.Search.Highlight.Highlighter, QueryScorer and Formatter classes in sitecore.client dll. Which classes and/or functions does Sitecore 7 provide to do highlighting in search results? I searched the web but I could not find the required information/examples. 回答1: Highlighting of results is not supported

Globally exclude cloned items from index?

我怕爱的太早我们不能终老 提交于 2019-12-11 08:35:29
问题 I am looking for an elegant way to exclude cloned items from my web index. I am having items appear as duplicates in my search results. I'd prefer it if only the original items appear and no clones at all. Some possible solutions that come to mind are to: Create a Global Item Boosting Rule to drastically lower the boost value if the item's _Source field is not empty. This is not preferred as it only lowers the score and does not remove the clones from the search results. Exclude the cloned

Are IFilters necessary to index full text documents using Lucene.NET

那年仲夏 提交于 2019-12-11 07:39:11
问题 I am moving allong in my project and come to a crossroads dealing with the file content. I have successfully created a working index that has some classification fields but I am know looking to have keyword search applied to the file contents. My issue is I am not sure if passing lucene a reader would translate to the API indexing the entire file contents. I did some searching online and found suggestions that an IFilter would be needed is that true? It seems somewhat complicated. Anyways my

How do I make Umbraco 5 ignore the bundled (with Examine) Lucene.NET

江枫思渺然 提交于 2019-12-11 06:57:47
问题 I'm using a never version of Lucene.NET with Umbraco 5, but realized that it collided with the version bundled with Examine that is included with Umbraco 5 (See C#: Could not load types from assembly). Rather than just removing Examine and the outdated Lucene.NET library from the \App_Plugins directory, I'm interested in a happy coexistence, where Examine uses my new version of Lucene.NET . I've tried adding this to web.config, but the outdated Lucene.NET library was still used:

Filtering results of Lucene search

那年仲夏 提交于 2019-12-11 06:07:31
问题 Let me explain my problem. I am using Lucene to search and display the results in asp.net web page. When I am searching, the Lucene is displaying all the records associated with my search. For Example I have 5000 records with name John. If I type John it is displaying all this 5000 records. I want to restrict this 5000 records based on some other attribute. I have four attributes namely First Name, Last Name, DOB and ID. Out those 5000 records I want it to display only the ones with the

Lucene.NET search index approach

橙三吉。 提交于 2019-12-11 05:26:02
问题 I am trying to put together a test case for using Lucene.NET on one of our websites. I'd like to do the following: Index in a single unique id. Index across a comma delimitered string of terms or tags. For example. Item 1: Id = 1 Tags = Something,Separated-Term I will then be structuring the search so I can look for documents against tag i.e. tags:something OR tags:separate-term I need to maintain the exact term value in order to search against it. I have something running, and the search

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

99封情书 提交于 2019-12-11 04:54:29
问题 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 tokenize delimiter? Do I have to subclass or write my own class that to roll my own tokenizer? Something else? ;) Or does Lucene.net not support phrases? Or is it smart enough to handle this use