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

baseform:illegal_argument_exception #22

Open
541079843 opened this issue Dec 19, 2016 · 0 comments
Open

baseform:illegal_argument_exception #22

541079843 opened this issue Dec 19, 2016 · 0 comments

Comments

@541079843
Copy link

541079843 commented Dec 19, 2016

Hi,
With the baseform plugin from version 2.3.4.0 of the bundle (and ES 2.3.4) , I got the error message
"reason":{"type":"illegal_argument_exception","reason":"Less than 2 subSpans.size():1"} .

The query string I uesed is
{ "query": { "function_score": { "query": { "bool": { "must": [ { "multi_match": { "query": "all company", "fields": [ "title.en", "content.en^0.1" ] } } ] } }, "functions": [ { "script_score": { "script": "(1)" } } ], "score_mode": "multiply" } }, "highlight": { "fields": { "content.en": { "pre_tags": [ "<span class=\"highlight\">" ], "post_tags": [ "</span>" ], "fragment_size": 200, "number_of_fragments": 1 }, "title.en": { "pre_tags": [ "<span class=\"highlight\">" ], "post_tags": [ "</span>" ], "fragment_size": 200, "number_of_fragments": 1 } } } }
And the index setting and mapping string is
{ "settings":{ "number_of_shards": 3, "number_of_replicas": 1, "analysis": { "analyzer": { "english": { "tokenizer": "standard", "filter": [ "lowercase", "synonym_en", "english_stop", "trim", "baseform", "english_possessive_stemmer", "english_stemmer" ], "char_filter": [ "html_strip" ] }, "ngram_analyzer": { "tokenizer": "ngram_tokenizer" } }, "filter": { "synonym_en": { "type": "synonym", "ignore_case": true, "tokenizer": "standard", "synonyms_path": "analysis/synonym_en.txt" }, "english_stop": { "type": "stop", "stopwords_path": "stopwords/english.txt" }, "english_stemmer": { "type": "stemmer", "language": "english" }, "english_possessive_stemmer": { "type": "stemmer", "language": "possessive_english" }, "baseform" : { "type" : "baseform", "language" : "en" }, "remove_empty": { "type" : "stop", "stopwords" : [ " ", " " ] } } } }, "document": { "_source": { "enabled": true }, "_all": { "enabled": true }, "dynamic": false, "properties": { "id": { "type": "string", "index": "not_analyzed" }, "title": { "type": "string", "index": "analyzed", "fields": { "en": { "type": "string", "analyzer": "english" } } }, "content": { "type": "string", "index": "analyzed", "store": "true", "norms": { "enabled": false }, "fields": { "en": { "type": "string", "analyzer": "english", "norms": { "enabled": false } } } } } } }'

The result of ES searching with the query string reported error message always , unless removing the 'highlight ' party from the query stringor reindex the documents without the 'basethform' module . By the way , the search key words is 'all comanies' what I input , and the word 'all' is a stop word.
So , can you help me to resolve the issue ?
Thank you very much.

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

No branches or pull requests

1 participant