Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Customize Lucene Index
Last Post 10/26/2011 8:04 PM by Mark Luffred. 3 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Mark Luffred
New Member
New Member
Posts:12


--
10/21/2011 5:09 AM
I would like to limit my search results so that entrytype:collection (folders) don't show up in my search results. I know how to manually remove them from the index using LUKE, but I would like to make this process automatic. I tried to add some logic to the Private Function CreateIndexDocument in LuceneSearchProvider.vb but I couldn't get the syntax correct. Any help would be appreciated. Thanks, Mark Luffred
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
10/24/2011 8:58 PM
If you have access to the partial source you have access to the (Lucene) search provider. There you could simply filter them out. In any case you'll need code changes to do this.

Peter
Mark Luffred
New Member
New Member
Posts:12


--
10/24/2011 10:19 PM
I have the source, but just not sure what I'm doing wrong. I tried adding to the top of Private Function CreateIndexDocument the following:

If Entry.EntryType <> "Collection" Then


...but that didn't work.
Not sure why.
Mark Luffred
New Member
New Member
Posts:12


--
10/26/2011 8:04 PM
I found a work around... All my documents contain "remarks" with the title repeated in this field. I modified search.ascx.vb as follows:
Dim Searchterms As New List(Of Services.Search.SearchTerm)
For Each sString As String In _searchQuery.Split(" "c)
AddSearchTerm(Searchterms, "remarks", sString)

I then switched on the "Quicksearch title only" in the module options.
You are not authorized to post a reply.