Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nik Wahlberg 639 posts 1237 karma points MVP
    Aug 20, 2010 @ 20:47
    Nik Wahlberg
    0

    Examine issues

    Hi all,

    I am running 4.5.1 on IIS7 and am trying to leverageExamine for search on a site with a ton of different content types. For now, I have this very basic search setup:

    protected void Page_Load(object sender, EventArgs e)
            {
                SearchTerm = Request.QueryString["s"];
                if (string.IsNullOrEmpty(SearchTerm)) return;
    
                var criteria = ExamineManager.Instance
                        .SearchProviderCollection["BioSearcher"]
                        .CreateSearchCriteria(IndexTypes.Content);
    
                var filter = criteria
                   .GroupedOr(new string[] { "nodeName", "pageContent", "pageHeading", "metaDescription", "eventSummary", "newsSummary", "courseTitle", "bioTitle", "bioDescription" }, SearchTerm)
                   .Not()
                   .Field("umbracoNaviHide", "1")
                   .Compile();
    
                SearchResultsCollection =
                    ExamineManager.Instance.SearchProviderCollection["BioSearcher"].Search(filter);
    
                SearchResultListing.DataSource = SearchResultsCollection;
                SearchResultListing.DataBind();
            }

    Here are a couple of things that I see happening:

    1. I get duplicates (triplicates, etc.) when I return results. This is fixed by publishing the page in question. When I then search again, I get only the one node back. The problem appears again if I 'Publish including children'. It appears the queue is not processed correctly with all the adds and deletes. 
    2. I get all the results in lower case; found this point from Slace (http://our.umbraco.org/forum/developers/extending-umbraco/11628-Lucene-Index-and-case) but it seems clunky to have to have this as a fix. Is there anything else that can be done to preserve the text casing for the results?
    Thanks all for your insight!
    Best,
    Nik

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Aug 21, 2010 @ 08:45
    Aaron Powell
    0

    Are you running Examine in async mode or not?

    If you turn off async (runAsync="false" on the indexer) it'll log to the Umbraco log table when errors happen.

    The only time I've see duplicate results if when the node exists multiple times in the Lucene store, and this happens when there's an error deleting.

    As for lower-casing yes, there was a design decision made in Examine which forced lowercase of all content, RC3 (which dropped last week) does correct this by giving casing back to the Analyzer like it should. I'm almost finished a blog post explaining what to do.

    You can use RC3 in 4.5.1 though.

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Aug 23, 2010 @ 16:31
    Nik Wahlberg
    0

    Sweet, thanks man. I'll check out RC3 and turn off async. Cheers!

    -- Nik

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Aug 24, 2010 @ 16:20
    Nik Wahlberg
    0

    Slace,

    That did it on the both the dups AND the casing. Thanks for poitning me to RC3 (at the time of this writing). 

    Cheer!

Please Sign in or register to post replies

Write your reply to:

Draft