Hi,
I am using elastic 6.2.4 and the zentity plugin 6.2.4 (Version 1.0.0).
URL: /_zentity/models/test
{ "attributes": { "name": { "type": "string" }, "ssn": { "type": "string" } }, "resolvers": { "name_ssn": { "attributes": [ "name", "ssn" ] }, "name_only": { "attributes": [ "name" ] } }, "matchers": { "exact": { "clause": { "term": { "{{ field }}": "{{ value }}" } } }, "fuzzy": { "clause": { "match": { "{{ field }}": { "query": "{{ value }}", "fuzziness": 100 } } } } }, "indices": { "test": { "fields": {"firstName": { "attribute": "name", "matcher": "fuzzy" }, "middleName": { "attribute": "name", "matcher": "fuzzy" }, "lastName": { "attribute": "name", "matcher": "fuzzy" }, "otherFirstName": { "attribute": "name", "matcher": "fuzzy" }, "otherLastName": { "attribute": "name", "matcher": "fuzzy" }, "ssn.keyword": { "attribute": "ssn", "matcher": "exact" } } } } }
I want to use firstname, lastname, middleName, otherFirstName, otherLastName considered as name attribute.
I have 5 indices in ELK
[{"_index":"test","_type":"identity","_id":"5","_version":1,"_score":1,"_source":{"firstName":"test","middleName":null,"lastName":"Beena","otherFirstName":null,"otherLastName":"William","ssn":"109520107"}},{"_index":"test","_type":"identity","_id":"2","_version":3,"_score":1,"_source":{"firstName":"test","middleName":null,"lastName":"test","otherFirstName":null,"otherLastName":null,"ssn":"109520107"}},{"_index":"test","_type":"identity","_id":"4","_version":3,"_score":1,"_source":{"firstName":"Williamz","middleName":null,"lastName":"Beena","otherFirstName":null,"otherLastName":null,"ssn":"109520107"}},{"_index":"test","_type":"identity","_id":"1","_version":1,"_score":1,"_source":{"firstName":"Bina","middleName":null,"lastName":"William","otherFirstName":null,"otherLastName":null,"ssn":"109520107"}},{"_index":"test","_type":"identity","_id":"3","_version":2,"_score":1,"_source":{"firstName":"Beena","middleName":null,"lastName":"Williamz","otherFirstName":null,"otherLastName":null,"ssn":"109520107"}}]
When hit the URL: _zentity/resolution/test with the below request
{ "attributes": { "name": [ "BEENA", "", "WILLIAM" ], "ssn": [ "109520107" ] }, "include": { "indices": [ "test" ], "resolvers": [ "name_ssn" ] } }
I got the response with all the indexes
{ "took": 53, "hits": { "total": 5, "hits": [ { "_index": "test", "_type": "identity", "_id": "5", "_hop": 0, "_attributes": { "name": "William", "ssn": "109520107" }, "_source": { "firstName": "test", "middleName": null, "lastName": "Beena", "otherFirstName": null, "otherLastName": "William", "ssn": "109520107" } }, { "_index": "test", "_type": "identity", "_id": "4", "_hop": 0, "_attributes": { "name": null, "ssn": "109520107" }, "_source": { "firstName": "Williamz", "middleName": null, "lastName": "Beena", "otherFirstName": null, "otherLastName": null, "ssn": "109520107" } }, { "_index": "test", "_type": "identity", "_id": "1", "_hop": 0, "_attributes": { "name": null, "ssn": "109520107" }, "_source": { "firstName": "Bina", "middleName": null, "lastName": "William", "otherFirstName": null, "otherLastName": null, "ssn": "109520107" } }, { "_index": "test", "_type": "identity", "_id": "3", "_hop": 0, "_attributes": { "name": null, "ssn": "109520107" }, "_source": { "firstName": "Beena", "middleName": null, "lastName": "Williamz", "otherFirstName": null, "otherLastName": null, "ssn": "109520107" } }, { "_index": "test", "_type": "identity", "_id": "2", "_hop": 1, "_attributes": { "name": null, "ssn": "109520107" }, "_source": { "firstName": "test", "middleName": null, "lastName": "test", "otherFirstName": null, "otherLastName": null, "ssn": "109520107" } } ] } }
I was not expecting the indexes "_id": "2" and "_id": "5" since names are totally off..
Can anyone please check on this.
- Why the "_id": "2" and "_id": "5" are returned. What am I doing wrong?
- the name attribute is null in the response but I see name fields populated in the _source field.
- I tried to changed the fuzziness score ("fuzziness") from 0 to 100, i do not see any change in the response. Any reference docs for the fuzziness score ?