FullTextSearch: Error parsing XSLT on single letter search when useWildcards="1"
Hi, this looks like a bug to me. Please suggest a fix or workaround.
On Umbraco 4.7.1 website, using FullTextSearch.xslt macro. Macro parameter sets useWildcards="1". When I perform a search containing single letters, say "i" or "i m " or "who m i"...it fails with error:
The issue goes away if I set useWildcards="0" though. Using umbDebugShowTrace=1, I see the following exception for the above error.
---------- searched "i m" -----------
An error occurred during a call to extension function 'Search'. See InnerException for a complete description of the error. An error occurred during a call to extension function 'Search'. See InnerException for a complete description of the error. at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args) at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args) at System.Xml.Xsl.CompiledQuery.Query.results(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) in {path_to_xslt}\FullTextSearch.xslt:line 303 at System.Xml.Xsl.CompiledQuery.Query.Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters) at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
maxClauseCount is set to 1024 maxClauseCount is set to 1024 at Lucene.Net.Search.BooleanQuery.Add(BooleanClause clause) at Lucene.Net.Search.BooleanQuery.Add(Query query, Occur occur) at Lucene.Net.Search.MultiTermQuery.ScoringBooleanQueryRewrite.Rewrite(IndexReader reader, MultiTermQuery query) at Lucene.Net.Search.MultiTermQuery.Rewrite(IndexReader reader) at Lucene.Net.Search.BooleanQuery.Rewrite(IndexReader reader) at FullTextSearch.HighlightTools.Highlight.luceneHighlightField(SearchResult result, UmbracoProperty umbracoProperty, String& summary) at FullTextSearch.HighlightTools.Highlight.GetSummary(SearchResult result, String& summary) at FullTextSearch.XsltExtensions.SearchExtension.resultsAsXml(ISearchResults searchResults, Summariser summariser, Int32 pageNumber, Int32 pageLength, Stopwatch stopwatch) at FullTextSearch.XsltExtensions.SearchExtension.Search(String searchType, String searchTerm, String titleProperties, String bodyProperties, String rootNodes, String titleLinkProperties, String summaryProperties, Int32 useHighlighting, Int32 summaryLength, Int32 pageNumber, Int32 pageLength, String fuzzieness, Int32 wildcard)
---------------------------------------------
fyi: line 303 is search call - <xsl:variable name="results" select="fulltextsearch.search:Search($queryType,$searchTerms,$titleProperties,$bodyProperties,$rootNodes,$titleLinkProperties,$summaryProperties,$contextHighlighting,$summaryLength,$pageNumber,$pageLength,$fuzzyness,$useWildcards)" />
We've released a couple of new versions of FullTextSearch recently. Can you please ensure to install the latest version compatible with your Umbraco installation. If you're on Umbraco 4.7.1, please use this one: https://fulltextsearch.codeplex.com/releases/view/108846.
I've tested it on Umbraco 4.7.1 and so far could not manage to reproduce the issue when running the package above.
Do you mean that we uninstall and reinstall the newer version of the package? Will it not lose any custom modifications...and it'll require re-indexing the full website right? (full reindex seems to cause many other troubles for our live website, is risky to perform)
Do you have a development version of the site? I would recommend backing this up first, then uninstalling and reinstalling FullTextSearch. If you’ve made any custom modifications in the FullTextSearch.config or any other file, you should be able to apply these again. You can also re-index the site again from the Developer - Full Text Search tab once re-installed. The purpose would be to first see if this will solve your XSLT issue locally before applying it to your live site.
FullTextSearch: Error parsing XSLT on single letter search when useWildcards="1"
Hi, this looks like a bug to me. Please suggest a fix or workaround.
On Umbraco 4.7.1 website, using FullTextSearch.xslt macro. Macro parameter sets useWildcards="1".
When I perform a search containing single letters, say "i" or "i m " or "who m i"...it fails with error:
Error parsing XSLT file: \xslt\FullTextSearch.xslt
An error occurred during a call to extension function 'Search'. See InnerException for a complete description of the error.
at System.Xml.Xsl.Runtime.XmlExtensionFunction.Invoke(Object extObj, Object[] args)
at System.Xml.Xsl.Runtime.XmlQueryContext.InvokeXsltLateBoundFunction(String name, String namespaceUri, IList`1[] args)
at System.Xml.Xsl.CompiledQuery.Query.results(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) in {path_to_xslt}\FullTextSearch.xslt:line 303
at System.Xml.Xsl.CompiledQuery.Query.Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
at System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver)
at System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results)
at umbraco.macro.GetXsltTransformResult(XmlDocument macroXML, XslCompiledTransform xslt, Dictionary`2 parameters)
at umbraco.macro.loadMacroXSLT(macro macro, MacroModel model, Hashtable pageElements)
maxClauseCount is set to 1024
at Lucene.Net.Search.BooleanQuery.Add(BooleanClause clause)
at Lucene.Net.Search.BooleanQuery.Add(Query query, Occur occur)
at Lucene.Net.Search.MultiTermQuery.ScoringBooleanQueryRewrite.Rewrite(IndexReader reader, MultiTermQuery query)
at Lucene.Net.Search.MultiTermQuery.Rewrite(IndexReader reader)
at Lucene.Net.Search.BooleanQuery.Rewrite(IndexReader reader)
at FullTextSearch.HighlightTools.Highlight.luceneHighlightField(SearchResult result, UmbracoProperty umbracoProperty, String& summary)
at FullTextSearch.HighlightTools.Highlight.GetSummary(SearchResult result, String& summary)
at FullTextSearch.XsltExtensions.SearchExtension.resultsAsXml(ISearchResults searchResults, Summariser summariser, Int32 pageNumber, Int32 pageLength, Stopwatch stopwatch)
at FullTextSearch.XsltExtensions.SearchExtension.Search(String searchType, String searchTerm, String titleProperties, String bodyProperties, String rootNodes, String titleLinkProperties, String summaryProperties, Int32 useHighlighting, Int32 summaryLength, Int32 pageNumber, Int32 pageLength, String fuzzieness, Int32 wildcard)
<xsl:variable name="results" select="fulltextsearch.search:Search($queryType,$searchTerms,$titleProperties,$bodyProperties,$rootNodes,$titleLinkProperties,$summaryProperties,$contextHighlighting,$summaryLength,$pageNumber,$pageLength,$fuzzyness,$useWildcards)" />
Hi M
We've released a couple of new versions of FullTextSearch recently. Can you please ensure to install the latest version compatible with your Umbraco installation. If you're on Umbraco 4.7.1, please use this one: https://fulltextsearch.codeplex.com/releases/view/108846.
I've tested it on Umbraco 4.7.1 and so far could not manage to reproduce the issue when running the package above.
Please let me know if this solves your issue.
Best regards,
Governor Technology
Hi
Do you mean that we uninstall and reinstall the newer version of the package? Will it not lose any custom modifications...and it'll require re-indexing the full website right? (full reindex seems to cause many other troubles for our live website, is risky to perform)
Hi M
Do you have a development version of the site? I would recommend backing this up first, then uninstalling and reinstalling FullTextSearch. If you’ve made any custom modifications in the FullTextSearch.config or any other file, you should be able to apply these again. You can also re-index the site again from the Developer - Full Text Search tab once re-installed. The purpose would be to first see if this will solve your XSLT issue locally before applying it to your live site.
Please let me know if this solves it or not.
Regards,
Governor Technology
is working on a reply...