Discussion:
HTML Phrase Searching
Marvin Herbold
2017-11-08 15:58:18 UTC
Permalink
Any plans to add support for HTML phrase searching?

We are running into the issue where the search feature is becoming less and
less useful as we add more more pages to our documentation.

For example, the terms "full day" when searched, currently returns dozens
of hits matching both "full" and "day" in separate sentences. But the full
phrase of "full day" actually only appears in one document.

The ability to have phrase searching (perhaps by using quotes in the search
bar) would be huge for us.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Komiya Takeshi
2017-11-11 09:38:46 UTC
Permalink
Hi Marvin,

It might been requested, but we don't have concrete plan for it.

Thanks,
Takeshi KOMIYA
Post by Marvin Herbold
Any plans to add support for HTML phrase searching?
We are running into the issue where the search feature is becoming less and
less useful as we add more more pages to our documentation.
For example, the terms "full day" when searched, currently returns dozens of
hits matching both "full" and "day" in separate sentences. But the full
phrase of "full day" actually only appears in one document.
The ability to have phrase searching (perhaps by using quotes in the search
bar) would be huge for us.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marvin Herbold
2017-11-13 13:38:06 UTC
Permalink
It does not look like it would be much effort to add full phrase searching
support.

Basically in somewhere searchtools.js, check if the search terms include
quotes and if it does then in the ajax callback just discard all results
that don't have the full search term in it.

BTW I see some code support for "excluded" words but when I try testing it
out using the search terms "full -day" (meaning results with "day" should
be excluded) it does not work. It displays all docs with both "full" and
"day".
Post by Komiya Takeshi
Hi Marvin,
It might been requested, but we don't have concrete plan for it.
Thanks,
Takeshi KOMIYA
Post by Marvin Herbold
Any plans to add support for HTML phrase searching?
We are running into the issue where the search feature is becoming less
and
Post by Marvin Herbold
less useful as we add more more pages to our documentation.
For example, the terms "full day" when searched, currently returns
dozens of
Post by Marvin Herbold
hits matching both "full" and "day" in separate sentences. But the full
phrase of "full day" actually only appears in one document.
The ability to have phrase searching (perhaps by using quotes in the
search
Post by Marvin Herbold
bar) would be huge for us.
--
You received this message because you are subscribed to the Google
Groups
Post by Marvin Herbold
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Marvin Herbold
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Komiya Takeshi
2017-11-13 16:21:18 UTC
Permalink
It does not look like it would be much effort to add full phrase searching support.
Sounds good. We always welcome your contribution :-)
It does not look like it would be much effort to add full phrase searching
support.
Basically in somewhere searchtools.js, check if the search terms include
quotes and if it does then in the ajax callback just discard all results
that don't have the full search term in it.
BTW I see some code support for "excluded" words but when I try testing it
out using the search terms "full -day" (meaning results with "day" should be
excluded) it does not work. It displays all docs with both "full" and
"day".
Post by Komiya Takeshi
Hi Marvin,
It might been requested, but we don't have concrete plan for it.
Thanks,
Takeshi KOMIYA
Post by Marvin Herbold
Any plans to add support for HTML phrase searching?
We are running into the issue where the search feature is becoming less and
less useful as we add more more pages to our documentation.
For example, the terms "full day" when searched, currently returns dozens of
hits matching both "full" and "day" in separate sentences. But the full
phrase of "full day" actually only appears in one document.
The ability to have phrase searching (perhaps by using quotes in the search
bar) would be huge for us.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marvin Herbold
2017-11-14 17:57:32 UTC
Permalink
I see what you did there. :-)

OK here is my contribution - I added exact phrase searching, and also fixed
your broken excluded keywords feature.

My version of your searchtools.js file can be found
here: https://alpha-dev.usked.com/manual/internal/_static/mysearchtools.js

For exact phrase search matching I updated the code in 2 places, and you
can find them by searching for /* CUSTOM SUPPORT FOR EXACT PHRASE SEARCH */

For the fix for excluded keywords, I also updated the code in 2 places. It
was actually broken for 2 reasons. The splitQuery function stripped out
the "-" so everything that checks for it later on obviously would not find
them any more. Then later on, there is a bug with using $u.contains - it
does a type-aware exact value match, but you were comparing an array of
ints against a string. A simple typecast to an int fixes this part. You
can find the 2 places by searching for /* FIX FOR EXCLUDED KEYWORDS */
Post by Marvin Herbold
It does not look like it would be much effort to add full phrase
searching support.
Sounds good. We always welcome your contribution :-)
Post by Marvin Herbold
It does not look like it would be much effort to add full phrase
searching
Post by Marvin Herbold
support.
Basically in somewhere searchtools.js, check if the search terms include
quotes and if it does then in the ajax callback just discard all results
that don't have the full search term in it.
BTW I see some code support for "excluded" words but when I try testing
it
Post by Marvin Herbold
out using the search terms "full -day" (meaning results with "day"
should be
Post by Marvin Herbold
excluded) it does not work. It displays all docs with both "full" and
"day".
On Saturday, November 11, 2017 at 2:39:07 AM UTC-7, Komiya Takeshi
Post by Komiya Takeshi
Hi Marvin,
It might been requested, but we don't have concrete plan for it.
Thanks,
Takeshi KOMIYA
Post by Marvin Herbold
Any plans to add support for HTML phrase searching?
We are running into the issue where the search feature is becoming
less
Post by Marvin Herbold
Post by Komiya Takeshi
Post by Marvin Herbold
and
less useful as we add more more pages to our documentation.
For example, the terms "full day" when searched, currently returns dozens of
hits matching both "full" and "day" in separate sentences. But the
full
Post by Marvin Herbold
Post by Komiya Takeshi
Post by Marvin Herbold
phrase of "full day" actually only appears in one document.
The ability to have phrase searching (perhaps by using quotes in the search
bar) would be huge for us.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it,
send
Post by Marvin Herbold
Post by Komiya Takeshi
Post by Marvin Herbold
an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups
Post by Marvin Herbold
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an
Post by Marvin Herbold
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Komiya Takeshi
2017-11-15 15:57:10 UTC
Permalink
Hi Marvin,

Thanks,
Could you modify it as a new pull request? I'm not good at JavaScript,
so I can't evaluate it correctly.
But other maintainers might be able to do it, I believe.

Thanks,
Takeshi KOMIYA
Post by Marvin Herbold
I see what you did there. :-)
OK here is my contribution - I added exact phrase searching, and also fixed
your broken excluded keywords feature.
https://alpha-dev.usked.com/manual/internal/_static/mysearchtools.js
For exact phrase search matching I updated the code in 2 places, and you can
find them by searching for /* CUSTOM SUPPORT FOR EXACT PHRASE SEARCH */
For the fix for excluded keywords, I also updated the code in 2 places. It
was actually broken for 2 reasons. The splitQuery function stripped out the
"-" so everything that checks for it later on obviously would not find them
any more. Then later on, there is a bug with using $u.contains - it does a
type-aware exact value match, but you were comparing an array of ints
against a string. A simple typecast to an int fixes this part. You can
find the 2 places by searching for /* FIX FOR EXCLUDED KEYWORDS */
Post by Komiya Takeshi
It does not look like it would be much effort to add full phrase searching support.
Sounds good. We always welcome your contribution :-)
It does not look like it would be much effort to add full phrase searching
support.
Basically in somewhere searchtools.js, check if the search terms include
quotes and if it does then in the ajax callback just discard all results
that don't have the full search term in it.
BTW I see some code support for "excluded" words but when I try testing it
out using the search terms "full -day" (meaning results with "day" should be
excluded) it does not work. It displays all docs with both "full" and
"day".
Post by Komiya Takeshi
Hi Marvin,
It might been requested, but we don't have concrete plan for it.
Thanks,
Takeshi KOMIYA
Post by Marvin Herbold
Any plans to add support for HTML phrase searching?
We are running into the issue where the search feature is becoming less
and
less useful as we add more more pages to our documentation.
For example, the terms "full day" when searched, currently returns dozens of
hits matching both "full" and "day" in separate sentences. But the full
phrase of "full day" actually only appears in one document.
The ability to have phrase searching (perhaps by using quotes in the search
bar) would be huge for us.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Marvin Herbold
2017-11-21 15:25:37 UTC
Permalink
Done - pull requests #4253 and #4254.
Post by Komiya Takeshi
Hi Marvin,
Thanks,
Could you modify it as a new pull request? I'm not good at JavaScript,
so I can't evaluate it correctly.
But other maintainers might be able to do it, I believe.
Thanks,
Takeshi KOMIYA
Post by Marvin Herbold
I see what you did there. :-)
OK here is my contribution - I added exact phrase searching, and also fixed
your broken excluded keywords feature.
https://alpha-dev.usked.com/manual/internal/_static/mysearchtools.js
For exact phrase search matching I updated the code in 2 places, and you can
find them by searching for /* CUSTOM SUPPORT FOR EXACT PHRASE SEARCH */
For the fix for excluded keywords, I also updated the code in 2 places. It
was actually broken for 2 reasons. The splitQuery function stripped out the
"-" so everything that checks for it later on obviously would not find them
any more. Then later on, there is a bug with using $u.contains - it does a
type-aware exact value match, but you were comparing an array of ints
against a string. A simple typecast to an int fixes this part. You can
find the 2 places by searching for /* FIX FOR EXCLUDED KEYWORDS */
Post by Komiya Takeshi
It does not look like it would be much effort to add full phrase searching support.
Sounds good. We always welcome your contribution :-)
It does not look like it would be much effort to add full phrase searching
support.
Basically in somewhere searchtools.js, check if the search terms include
quotes and if it does then in the ajax callback just discard all results
that don't have the full search term in it.
BTW I see some code support for "excluded" words but when I try testing it
out using the search terms "full -day" (meaning results with "day" should be
excluded) it does not work. It displays all docs with both "full" and
"day".
Post by Komiya Takeshi
Hi Marvin,
It might been requested, but we don't have concrete plan for it.
Thanks,
Takeshi KOMIYA
Post by Marvin Herbold
Any plans to add support for HTML phrase searching?
We are running into the issue where the search feature is becoming less
and
less useful as we add more more pages to our documentation.
For example, the terms "full day" when searched, currently returns dozens of
hits matching both "full" and "day" in separate sentences. But the full
phrase of "full day" actually only appears in one document.
The ability to have phrase searching (perhaps by using quotes in the search
bar) would be huge for us.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
*Marvin Herbold*
/Director of Technology/
Access Interpreting, Inc.
Website: ainterpreting.com <https://www.ainterpreting.com/>
(480) 347-9629 (Support VP)
(571) 730-4330 (Main Office Voice)
(571) 730-4331 (Main Office Fax)
(202) 540-8617 (Main Office VP)
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...