You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/09/02 14:08:32 UTC

[GitHub] [lucene-solr] dsmiley commented on a change in pull request #1819: SOLR-14782: Document how to unescape for the QueryElevationComponent.

dsmiley commented on a change in pull request #1819:
URL: https://github.com/apache/lucene-solr/pull/1819#discussion_r482097781



##########
File path: solr/solr-ref-guide/src/the-query-elevation-component.adoc
##########
@@ -61,7 +61,18 @@ Optionally, in the Query Elevation Component configuration you can also specify
 The Query Elevation Search Component takes the following parameters:
 
 `queryFieldType`::
-Specifies which fieldType should be used to analyze the incoming text. For example, it may be appropriate to use a fieldType with a LowerCaseFilter.
+Specifies which fieldType should be used to analyze the incoming text. For example, it may be appropriate to use a fieldType with a LowerCaseFilter. Other example, if you need to unescape backslash-escaped queries, then you can define the fieldType to preprocess with a PatternReplaceCharFilter. Here is the corresponding example of fieldType (traditionally in `schema.xml`):
+
+[source,xml]
+----
+<fieldType name="unescapelowercase" class="solr.TextField">
+  <analyzer>
+    <charFilter class="solr.PatternReplaceCharFilterFactory" pattern="\\(.)" replacement="$1"/>

Review comment:
       I think there's a syntax to use such that we only un-escape non-alphanumeric?  If they type a\b (which might be in some identifier) then they probably meant that.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org