Developer forum

Forum » Development » Searching the Lucene search index

Searching the Lucene search index

Morten Fink Eriksen
Reply

Im trying to do some searching using the search index, but i seem to be having some trouble with the orderby criteria, i've created and orderby criteria like this:

searchQuery.Add(new OrderByCriteria("sys_name", SortDirection.Ascending));

But it doesn't really seem to having any effect on the search result, when i set my Limitcriteria to a large number an see what comes out, it doesn't seem to be sorted in any way, its just in some random order.

 

Suggestion: A good thing would be to have a list of which fields are available to search on and most important what their names are, since i had to find what i "think" is the name field by looking at what search filters use for their value.


Replies

 
Morten Bengtson
Reply
This post has been marked as an answer

Try using "sort_name" instead of "sys_name".

Votes for this answer: 1
 
Morten Fink Eriksen
Reply

Im having another issue, and i don't know if i have overlooked something, but i seem to be having trouble getting results from the searchindex, when searching for danish characters like æ,ø and å?

 

Anybody else experiencing this?

 
Morten Fink Eriksen
Reply

Morten thanks for the help.. fixed the æ,ø and å issue myself.

 

But i have one last question... do you know where to find the fieldnames that lucene uses in DW, since you knew about the "sort_name" field? :)

 
Morten Bengtson
Reply

Hi Morten,

You can get some of the field names through IndexEntry.GetSystemFieldName(IndexEntrySystemField field), but only for general fields and not the fields specific to ecommerce. As there is no documentation on this I have used Reflector to find out what field names are used in ecommerce :/

 

 

You must be logged in to post in the forum