Skip to content
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

adding fuzzy matching ability #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

navd
Copy link
Contributor

@navd navd commented Mar 22, 2018

No description provided.

var currentStart = 0
words.foreach(word => {
val params = new ModifiableSolrParams()
params.add(CommonParams.Q, "tagname_str:" + word + "~" + fuzzinessValue)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"word" ought to be escaped. Use org.apache.solr.client.solrj.util.ClientUtils#escapeQueryChars

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsmiley done.

@sujitpal
Copy link
Contributor

sujitpal commented Jul 4, 2018

Hi @navd my apologies for not seeing this earlier. I just released v2 and was going through the project when I saw this PR. Solr v2 currently removes fuzzy matching because it is not in line with the streaming approach supported by SolrTextTagger, and based on results I got, not very good at what it does anyway. Solr v2 attempts to move the language analysis portion into Lucene.

I am thinking of bringing back fuzzy search via my proposal described in issue 15.

BTW, one problem with this code is that you are matching individual words against (potentially multi-word) entities in the dictionary, so there is scope for lots of false matches. Phrase chunking then matching entities with phrases are relatively low recall, so that is not ideal either. An idea might be to use phrases and stemmed matching. Also with the new Solr backend, we have access to the OpenNLP based Solr Analyzers, which might be a promising direction to look at. May even make more sense than my proposal on Issue 15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants