-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4907 Tweaked advanced search documentation to include new search operators #4909
4907 Tweaked advanced search documentation to include new search operators #4909
Conversation
…h operators Fixes: #4907
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. A couple little things, but I'm happy to see our documentation advancing lockstep with our enhancements.
@@ -34,7 +34,7 @@ <h2 class="alt"> | |||
{% elif error_message == "unbalanced_quotes" %} | |||
Did you forget to close one or more quotes? | |||
{% elif error_message == "disallowed_wildcard_pattern" %} | |||
The query contains a disallowed expensive wildcard pattern. | |||
The query contains a <a href="{% url "advanced_search" %}#disallowed-expensive-wildcards">disallowed expensive wildcard</a> pattern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think most people understand what it means to be an "expensive" wildcard, so, I suggest:
The query contains a <a href="{% url "advanced_search" %}#disallowed-expensive-wildcards">disallowed expensive wildcard</a> pattern. | |
The query contains a <a href="{% url "advanced_search" %}#disallowed-expensive-wildcards">disallowed wildcard</a> pattern. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, removed expensive. Also removed from the API error message.
|
||
<p>The question mark character (<strong>?</strong>) can be used similarly as a single letter wildcard. For example, this would find cases containing the word "immigrant" or "emmigration": <code>?mmigra*</code> | ||
</p> | ||
<p><code>*</code> can also be used inside words, where it acts as a single-character wildcard. For example, a query like <code>gr*mm*r</code> would match cases containing both "gr<strong>a</strong>mm<strong>a</strong>r" and "gr<strong>i</strong>mm<strong>e</strong>r".</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need <nobr>
's here, right?
<p><code>*</code> can also be used inside words, where it acts as a single-character wildcard. For example, a query like <code>gr*mm*r</code> would match cases containing both "gr<strong>a</strong>mm<strong>a</strong>r" and "gr<strong>i</strong>mm<strong>e</strong>r".</p> | |
<p><code>*</code> can also be used inside words, where it acts as a single-character wildcard. For example, a query like <nobr><code>gr*mm*r</code></nobr> would match cases containing both <nobr>"gr<strong>a</strong>mm<strong>a</strong>r"</nobr> and <nobr>"gr<strong>i</strong>mm<strong>e</strong>r"</nobr>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that <nobr>
is deprecated and is no longer recommended for use.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nobr
Instead used text-nowrap
css class.
|
||
<p>Queries that match multiple endings are only allowed if the base word has at least three characters. Therefore, queries like <code>a*</code>, <code>bc*</code>, <code>!a</code>, or <code>!bc</code> are disallowed due to performance issues.</p> | ||
<p>Performing a query like these will throw an error with the message:</p> | ||
<p><code>The query contains a disallowed expensive wildcard pattern.</code></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p><code>The query contains a disallowed expensive wildcard pattern.</code></p> | |
<p><code>The query contains a disallowed wildcard pattern.</code></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. Also from the section title, now just Disallowed Wildcards
Thanks! Suggestions applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
f8645e7
into
3888-support-additional-search-connectors
Fixes: #4907
Included & operator to AND documentation.
Added But not documentation
Tweaked the Wildcards documentation to reflect the new behavior of
*
and!
and updated fuzzy search documentation according to ES behaviour:Added documentation about disallowed expensive wildcard patterns:
Linked disallowed expensive wildcard error message to documentation:
Fixed the
/s
and/p
syntax error message to correctly refer to a proximity query example instead of a fuzzy query, as it did previously.