<requestHandler name="/suggest" class="solr.SearchHandler">
                <lst name="defaults">
                        <str name="echoParams">explicit</str>
                        <str name="defType">edismax</str>
                        <str name="rows">10</str>
                        <str name="fl">full_name,job_tree, company, city, 
state, country,
first_name, last_name, id</str>
                        <str name="qf">full_name_suggest^60 
full_name_ngram^100.0 job_suggest^30
job_ngram^50.0 </str>
                        <str name="pf">full_name_edge^100.0 job_edge^50.0</str>
                        <str name="group">true</str>
                        <str name="group.field">full_name</str>
           

                        <str name="sort">full_name asc</str>
                        <str name="group.sort">full_name asc</str>
                </lst>
        </requestHandler>

the configuration above let me search firstly by name, if there is no result
it will go and make the search by job hopefully this help you, I would like
to let you know that it does not work great if you have Japanese, Arabic, or
Chinese. 

this is result for query to search for user whose name is alaa or work as
developer
http://localhost:9090/solr/people/suggest?q=alaa%20developer&wt=json&indent=true

{
  "responseHeader":{
    "status":0,
    "QTime":27,
    "params":{
      "indent":"true",
      "q":"alaa developer",
      "wt":"json"}},
  "grouped":{
    "full_name":{
      "matches":4,
      "groups":[{
          "groupValue":"alaa",
          "doclist":{"numFound":1,"start":0,"docs":[
              {
                "job_tree":"CTO(Chief Technology Officer) ",
                "last_name":"Abuzaghleh",
                "state":"California",
                "country":"United States",
                "city":"North Hollywood",
                "id":"a2757538-9f16-42d8-907a-199c11787d09",
                "company":"letspeer.com",
                "full_name":"Alaa Abuzaghleh",
                "first_name":"Alaa"}]
          }},
        {
          "groupValue":"user1",
          "doclist":{"numFound":1,"start":0,"docs":[
              {
                "job_tree":"Web Developer",
                "last_name":"user1",
                "state":"Amman",
                "country":"Jordan",
                "city":"Aljameaa",
                "id":"78bd8079-666f-4e09-ab4f-aed796040c93",
                "company":"BT-AT",
                "full_name":"user1 user1",
                "first_name":"user1"}]
          }},
        {
          "groupValue":"user4",
          "doclist":{"numFound":1,"start":0,"docs":[
              {
                "job_tree":"Mobile App Developer",
                "last_name":"user4",
                "state":"",
                "country":"",
                "city":"",
                "id":"9e50c5b1-49cc-444a-a752-8b8ebe04b6f6",
                "company":"Apple ",
                "full_name":"user4 user4",
                "first_name":"user4"}]
          }},
        {
          "groupValue":"z3ra",
          "doclist":{"numFound":1,"start":0,"docs":[
              {
                "job_tree":"",
                "last_name":"z3ra",
                "state":"",
                "country":"",
                "city":"",
                "id":"2a82735d-cce0-400e-826b-b78f6bb56115",
                "company":"",
                "full_name":"usAlaa z3ra",
                "first_name":"usAlaa"}]
          }}]}}}

you can go to the multi lengaul issue in same place where you put your issue
and look for schema configuration. 






--
View this message in context: 
http://lucene.472066.n3.nabble.com/different-fields-for-user-supplied-phrases-in-edismax-tp4173862p4173886.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to