Sphinx index/search for keywords which have dashes or periods

5 views
Skip to first unread message

Russell Ballestrini

unread,
Nov 17, 2020, 9:20:48 PM11/17/20
to sphinx-dev

This is a test repo to try out Sphinx index/search with keywords which have dashes or periods, like instance ids, UUIDs, or IP addresses:


I found some threads discussing the use of `ignore_chars` to adjust the tokenization of words but I have not found hints on where or how to accomplish this.


Where do I configure `ignore-chars` in a project like the repo I linked above?

Russell Ballestrini

unread,
Nov 18, 2020, 10:54:56 AM11/18/20
to sphinx-dev
I think I'm likely conflating these two projects (sphinx search versus Python sphinx docs).

Is it possible to customize the default build-time Sphinx doc's search indexer to treat dashes as part of a word?


Would I need to implement a custom search adapter to change this behavior?

Komiya Takeshi

unread,
Nov 22, 2020, 9:44:29 AM11/22/20
to sphin...@googlegroups.com
Hi,

>Is it possible to customize the default build-time Sphinx doc's search indexer to treat dashes as part of a word?

It seems there are two ways to install a custom indexer to Sphinx:

* https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_search_language
* https://www.sphinx-doc.org/en/master/usage/advanced/websupport/searchadapters.html

But I'm not good at how to implement an extension with these endpoints...

I hope you can find a way!

Thanks,
Takeshi KOMIYA

2020年11月19日(木) 0:54 Russell Ballestrini <russell.b...@gmail.com>:
> --
> 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.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/sphinx-dev/40333c2c-7a2d-45bf-8fd6-00b8c186955bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages