Elasticsearch – How to normalize score when combining regular query and function_score?

Recently i am working on a problem like this too. I couldn’t find any formal documentation about this issue but when i investigate the results with “explain api”, it seems like “queryNorm” is not applied to the score directly coming from “functions” field. This means that you can not directly normalize script value. However, i … Read more

Filename search with ElasticSearch

You have various problems with what you pasted: 1) Incorrect mapping When creating the index, you specify: “mappings”: { “files”: { But your type is actually file, not files. If you checked the mapping, you would see that immediately: curl -XGET ‘http://127.0.0.1:9200/files/_mapping?pretty=1’ # { # “files” : { # “files” : { # “properties” : … Read more

Entity Extraction/Recognition with free tools while feeding Lucene Index

The problem you are facing in the ‘wicket’ example is called entity disambiguation, not entity extraction/recognition (NER). NER can be useful but only when the categories are specific enough. Most NER systems doesn’t have enough granularity to distinguish between a sport and a software project (both types would fall outside the typically recognized types: person, … Read more

What are segments in Lucene?

The Lucene index is split into smaller chunks called segments. Each segment is its own index. Lucene searches all of them in sequence. A new segment is created when a new writer is opened and when a writer commits or is closed. The advantages of using this system are that you never have to modify … Read more

Elasticsearch always returning “mapping type is missing”

Turns out this is happening because the mapping needs to be applied to the type: I tried applying it to the wrong thing: curl -XPUT 10.160.86.134:9200/products/_mapping -d ‘{ It needs to be applied to the type like so: curl -XPUT 10.160.86.134:9200/products/product/_mapping -d ‘{ It’s sad that a simple google search couldn’t answer this. Also the … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)