0

The Security Lookup user control was implemented in C# using the Lucene.Net assembly to search securities while reading Lucene Index which stored US and Global equities. Security Lookup is a User Control with two DevExpress controls the TextBox and the LookUp

When the symbol ex VOD is placed on the TextBox the Lucene searcher will parse the Index for potential hits.

For example, if I enter VOD searching for Vodaphone which is one of the largest companies in the UK, it highlights VOD in the US which is not optimal because I am likely searching for VOD in the UK.

Here's my code for the Lucene parser.

var searcher = new IndexSearcher(IndexReader.Open(GetIndexDirectory(assetType), true));
MultiFieldQueryParser queryParser = new MultiFieldQueryParser(Lucene.Net.Util.Version.LUCENE_30, new string[] { "Symbol", "Name", "Isin", "Cusip", "Sedol", "MarketName" }, analyzer)
{
    DefaultOperator = QueryParser.Operator.AND
};

It was recommended to for the ordering of the relevant items is search is by - Primary Market, Underlying Symbol, and Volume.

I would like to see most relevant hits on the top of the sorted list. Does anyone know what sorting algorithms Google or Bloomberg or Yahoo Finance is using?

Any suggestions would be appreciated.

3
  • You close your question with "I would like to see most relevant hits on the top of the sorted list. Does anyone know what sorting algorithms Google or Bloomberg or Yahoo Finance is using?" StackOverflow is just not the place for such questions. You might try Quora for that sort of question. Commented Mar 4, 2021 at 21:42
  • In Lucene.Net you don't need an algorithm to implement search. It's a search engine, that what it does, it performs searches, lots of kinds of searches. I recommend you find a tutorial to walk through like this one: codeproject.com/Articles/609980/Small-Lucene-NET-Demo-App Commented Mar 4, 2021 at 21:49
  • Please don't post the same question content after your prior question was closed yesterday. That is frowned upon on StackOverflow. The content of your question is too broad. If you are having problems with a specific piece of Lucene.Net this is a good place for answers. But posting your "parser" code that is 4 lines and then not asking any specific question about that code isn't going to be productive for anyone. Commented Mar 4, 2021 at 21:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.