How we can use different analyzers for one field.(At a time only one analyzer we will use in search but, search requirement is differ)


(sowjanya) #1

Hi,
I have below Requirement. Please help me.

I am using elasticsearch-1.1.0

  • In Index, I have n no.of Fields. and m no.of Types
  • Eg: Types: Person,Book
  • Eg: Fields:
  • Person: Name,age,Email,Phone
  • Book: Name,author,price
  • How to set the analyzers to all Fields and all types.

My Search Requirement:
Input:
Person:
Name: john smith
age:30
Email: john@gmail.com
Phone: (987) 123-4567

Name: John Smith
age:30
Email: john@gmail.com
Phone: (879) 123-4567

Name: django$haystack
age:30
Email: john@gmail.com
Phone: (987) 123-4567

Name: django#haystack
age:30
Email: john@gmail.com
Phone: (987) 123-4567

Scenario1:
Search String : django#haystack
Results: django$haystack,django#haystack
But, We are expected Result is django#haystack

Scenario2:
*Search String: *John Smith
Results: John Smith,john smith
Expected Results are John Smith
Scenario3:
*Search String: *John Smith
Results: John Smith,john smith
It is fine. But, we need to support Scenario2 also. How we can support
Scenario2 and Scenario3 using analyzers.

Please Help me in this.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ef287049-2c3a-4862-b077-82bf3cb63a9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2