java - Perform Lucene wildcard search -


how lucene support wild card searches?

i want search words starting ox searching words ox* returning unexpected results anti-oxide - don't want result.

according lucene faq query ox* should match terms begin ox.

because standardtokenizer considers hyphen delimiter, word anti-oxide split 2 words - anti , oxide , hence match anti-oxide when search ox*.

you have 2 options change behavior:

  1. override default tokenizer , write own suit needs
  2. ugly pre-processing of text replace/remove such delimiters. may not ideal solution

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -