Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello,
We're having issues with case sensitivity with our Examine search. Every forum says to use the standard analyzer and rebuild the index, but that is not working. After doing so, our search only finds matching lowercase phrases.
Here is some of our code. Any suggestions?
< IndexSet SetName="MRCIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/MRCIndex" IndexParentId="1204">< IndexAttributeFields>< add Name="id" />< add Name="nodeName" />< add Name="owner" EnableSorting="true" />< add Name="writerName" />< add Name="path" />< add Name="nodeTypeAlias" />< add Name="parentID" /></ IndexAttributeFields>< IndexUserFields>< add Name="titleMRC" />< add Name="summary" />< add Name="keywordsMRC" />< add Name="content" />< add Name="resourceContact" />< add Name="testimonialName" />< add Name="testimonialBusiness" />< add Name="type" />< add Name="service" />< add Name="industry" />< add Name="location" />< add Name="owner" EnableSorting="true" /></ IndexUserFields>< IncludeNodeTypes>< add Name="Resource Folder" />< add Name="Resource" /></ IncludeNodeTypes>< ExcludeNodeTypes /></ IndexSet> < add name="MRCIndexer" type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine" dataService="UmbracoExamine.DataServices.UmbracoDataService, UmbracoExamine" runAsync="true" supportUnpublished="false" supportProtected="false" indexSet="MRCIndexSet" interval="10" analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/> < add name="MRCSearcher" type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine" analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" indexSet="MRCIndexSet"/> var criteria = ExamineManager.Instance.SearchProviderCollection["MRCSearcher"].CreateSearchCriteria();Examine.SearchCriteria.IBooleanOperation filter = null; //Check to see what values have been searched for based on the query string and build the filter for search.filter = criteria.NodeTypeAlias( "resource"); if (Request.QueryString["key"] != null){ string[] SearchTermSplit = Split(Request.QueryString["key"], "+", "\"", true); int i = 0; for (i = 0; i < SearchTermSplit.Length; i++){filter = filter.And().GroupedOr( new string[] { "titleMRC", "summary", "keywordsMRC", "content", "resourceContact", "testimonialName", "testimonialBusiness"}, SearchTermSplit[i]);}}
<
IndexSet SetName="MRCIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/MRCIndex" IndexParentId="1204">
IndexAttributeFields>
add Name="id" />
add Name="nodeName" />
add Name="owner" EnableSorting="true" />
add Name="writerName" />
add Name="path" />
add Name="nodeTypeAlias" />
add Name="parentID" />
</
IndexUserFields>
add Name="titleMRC" />
add Name="summary" />
add Name="keywordsMRC" />
add Name="content" />
add Name="resourceContact" />
add Name="testimonialName" />
add Name="testimonialBusiness" />
add Name="type" />
add Name="service" />
add Name="industry" />
add Name="location" />
IncludeNodeTypes>
add Name="Resource Folder" />
add Name="Resource" />
ExcludeNodeTypes />
IndexSet>
add name="MRCIndexer"
type="UmbracoExamine.LuceneExamineIndexer, UmbracoExamine"
dataService="UmbracoExamine.DataServices.UmbracoDataService, UmbracoExamine"
runAsync="true"
supportUnpublished="false"
supportProtected="false"
indexSet="MRCIndexSet"
interval="10"
analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
add name="MRCSearcher" type="UmbracoExamine.LuceneExamineSearcher, UmbracoExamine"
analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
indexSet="MRCIndexSet"/>
var
criteria = ExamineManager.Instance.SearchProviderCollection["MRCSearcher"].CreateSearchCriteria();
Examine.SearchCriteria.IBooleanOperation filter =
null;
//Check to see what values have been searched for based on the query string and build the filter for search.
filter = criteria.NodeTypeAlias(
"resource");
if (Request.QueryString["key"] != null)
{
string[] SearchTermSplit = Split(Request.QueryString["key"], "+", "\"", true);
int i = 0;
for (i = 0; i < SearchTermSplit.Length; i++)
filter = filter.And().GroupedOr(
new string[] { "titleMRC", "summary", "keywordsMRC", "content", "resourceContact", "testimonialName", "testimonialBusiness"}, SearchTermSplit[i]);
}
Duplicate post, find answer in http://our.umbraco.org/forum/developers/extending-umbraco/27319-Examine-standard-analyzer-only-finds-lowercase
Cheers,
/Dirk
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Examine standardanalyzer Only Finds Lowercase
Hello,
We're having issues with case sensitivity with our Examine search. Every forum says to use the standard analyzer and rebuild the index, but that is not working. After doing so, our search only finds matching lowercase phrases.
Here is some of our code. Any suggestions?
Duplicate post, find answer in http://our.umbraco.org/forum/developers/extending-umbraco/27319-Examine-standard-analyzer-only-finds-lowercase
Cheers,
/Dirk
is working on a reply...