3

When I type the string string "cli", I get results like "client 1", "client 2", etc. But when I type "lie", I dont get any results. It seems that wild cards are added only at the end.

How do add this feature to my site?

goelakash
  • 2,502
  • 4
  • 40
  • 56

2 Answers2

5

It's not supported by ZCTextIndex, see http://docs.zope.org/zope2/zope2book/SearchingZCatalog.html#searching-zctextindexes

I fear that also switching to search using Solr (through collective.solr or other integrations) will not help.

keul
  • 7,673
  • 20
  • 45
  • Any idea if a future release would be planning to add this? – goelakash Jan 18 '16 at 08:33
  • I don't think you will see this in a future Zope/Plone release for a simple motivation: current trend is to move search externally, to a more efficient, better dedicated software like Solr or Elasticsearch. Don't know if Solr will implement this, or if Elasticsearch already does. – keul Jan 18 '16 at 08:54
  • So if I were to add an external search, what kind of a plugin or solution should I be looking at? Would it be feasible? – goelakash Jan 18 '16 at 08:56
  • It will be a better search engine, more flexible, but it will require more work and knowedge. Take a loot at collective.elasticindex (but first: check if elasticsearch implements what you need). Good luck! – keul Jan 18 '16 at 08:58
  • Thanks for all the support :) – goelakash Jan 18 '16 at 08:59
  • 2
    collective.solr is the other package that you can look for (integration layer with Solr) – gforcada Jan 19 '16 at 09:21
  • @gforcada I briefly checked the original issue but I read that Lucene isn't supporting wildcard at the beginning. I'm wrong? – keul Jan 19 '16 at 09:27
  • 3
    @keul it seems to be more of a Solr configuration thingie http://stackoverflow.com/questions/3229286/wildcard-search-in-solr – gforcada Jan 20 '16 at 15:26
1

Products.TextIndexNG3 (https://pypi.python.org/pypi/Products.TextIndexNG3) supports wildcards at the beginning and much more.

it's even possible to define synonyms yourself - so a search for 'kitten' also returns documents containing 'cat'

works fine for plone4.x, didn't try for plone5. and as @keul mentioned there is not much development going on for this addon too because the trend is to use specialized search-services

fRiSi
  • 1,238
  • 6
  • 13
  • Products.TextIndexNG3 supports Plone 4.3, 5.0 and 5.1. See https://github.com/zopyx/Products.TextIndexNG3/blob/master/Products/TextIndexNG3/CHANGES.txt – pbauer Dec 20 '18 at 10:57