Search for name(text) with spaces

Hi,

Searching for names(text) with spaces in it, causing problem to me,
I have mapping similar to
"{"user":{"properties":{"name":{"type":"string"}}}}"

Ideally what it should return and rank results as follows

  1. Bring on top names that exact match the search term (highest score)
  2. Names that starts with the search term (high score)
  3. Names that contains the exact search term as substring (medium score)
  4. Names that contains any of the search term token (lowest score)

*Example *
For following names in elasticsearch
Maaz Tariq
Ahmed Maaz Tariq
Maaz Sheeba
Maaz Bin Tariq
Sana Tariq
Maaz Tariq Ahmed

Searching for "Maaz Tariq" , Results should be in following order
Maaz Tariq (highest score)
Maaz Tariq Ahmed (high score)
Ahmed Maaz Tariq (medium score)
Maaz Bin Tariq (lowest score)
Maaz Sheeba (lowest score)
Sana Tariq (lowest score)

Can any one point me how and which analyzers to use? and how to rank the
search results for names?

Thanks
-Maaz

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Guys any input on it?

On Thursday, May 23, 2013 1:11:04 PM UTC+5, Maaz Bin Tariq wrote:

Hi,

Searching for names(text) with spaces in it, causing problem to me,
I have mapping similar to
"{"user":{"properties":{"name":{"type":"string"}}}}"

Ideally what it should return and rank results as follows

  1. Bring on top names that exact match the search term (highest score)
  2. Names that starts with the search term (high score)
  3. Names that contains the exact search term as substring (medium score)
  4. Names that contains any of the search term token (lowest score)

*Example *
For following names in elasticsearch
Maaz Tariq
Ahmed Maaz Tariq
Maaz Sheeba
Maaz Bin Tariq
Sana Tariq
Maaz Tariq Ahmed

Searching for "Maaz Tariq" , Results should be in following order
Maaz Tariq (highest score)
Maaz Tariq Ahmed (high score)
Ahmed Maaz Tariq (medium score)
Maaz Bin Tariq (lowest score)
Maaz Sheeba (lowest score)
Sana Tariq (lowest score)

Can any one point me how and which analyzers to use? and how to rank the
search results for names?

Thanks
-Maaz

--
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.
For more options, visit https://groups.google.com/groups/opt_out.