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

search_analyzer does not seem to kick in as expected #3903

Closed
lukas-vlcek opened this issue Oct 14, 2013 · 3 comments
Closed

search_analyzer does not seem to kick in as expected #3903

lukas-vlcek opened this issue Oct 14, 2013 · 3 comments
Assignees

Comments

@lukas-vlcek
Copy link
Contributor

I realized this issue while working on recreation script for #3881

It seems to me that the search_analyzer does not kick in in some cases, the following two recreation scripts are provided.

The first scripts shows a simple use case where the search_analyzer kicks in as expected. Everything looks ok to me here.

The second script (which is based on the original recreation scripts from #3881) shows that the search_analyzer does NOT kick in and yield correct results ONLY if stated explicitly. Not sure if I understand what it is fundamental difference between the use case in first script and use case in the second script. Both scripts have very similar structure and unless I made some typo there I do not understand why the search analyzer haven't been used automatically.

Both scripts were tested against the latest master:

Elasticsearch version and build:
{
  "ok" : true,
  "status" : 200,
  "name" : "Anelle",
  "version" : {
    "number" : "1.0.0.Beta1",
    "build_hash" : "9a062e465ce86aa9a72dd6dd5337be6447a83506",
    "build_timestamp" : "2013-10-13T15:08:48Z",
    "build_snapshot" : true,
    "lucene_version" : "4.5"
  },
  "tagline" : "You Know, for Search"
}
@ghost ghost assigned javanna Oct 14, 2013
@javanna
Copy link
Member

javanna commented Oct 14, 2013

I checked your second script and found an error in the index creation. In fact if you try and get the mapping for your type you'll see it's empty. The mappings object in your script is within the settings one, while it should be at its same level.

Once you fixed that everything should work as expected, the search analyzer is used and so on. Can you confirm?

@javanna javanna closed this as completed Oct 14, 2013
@javanna
Copy link
Member

javanna commented Oct 14, 2013

Sorry, didn't mean to close before your reply, reopening...

@javanna javanna reopened this Oct 14, 2013
@lukas-vlcek
Copy link
Contributor Author

You are correct, the nesting level of mappings section was wrong.
Thanks!

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

No branches or pull requests

2 participants