cakephp / elastic-search

Elastic search datasource for CakePHP
Other
88 stars 53 forks source link

Questions #71

Closed unikapps closed 9 years ago

unikapps commented 9 years ago

I have two questions:

  1. How can i get the max-score?
  2. how can i configure a language analyzer like this: https://www.elastic.co/guide/en/elasticsearch/reference/1.4/analysis-lang-analyzer.html
lorenzo commented 9 years ago

About question 2: this plugin does not deal with index creation... please follow the instructions in the elastic search manual for creating indexes

lorenzo commented 9 years ago

On question 1: a max score of what?

unikapps commented 9 years ago

Thanks @lorenzo for your answer:

  1. When i use curl there is max-score of the search term in response like this:
{
    "took": 114,
    "timed_out": false,
    "_shards": {
        "total": 5,
        "successful": 5,
        "failed": 0
    },
    "hits": {
        "total": 1,
        "max_score": 0.032739405,
        "hits": [
            {
                "_index": "ibana_index",
                "_type": "words",
                "_id": "AVCoaGICdWeEYUSbhbJn",
                "_score": 0.032739405,
                "_source": {
                    "name": "....",
                    "description": "..."
                }
            }
        ]
    }
}
lorenzo commented 9 years ago

Check the api for the ResultSet, (the object returned after executing the query) https://github.com/cakephp/elastic-search/blob/master/src/ResultSet.php#L164

unikapps commented 9 years ago

Can you please give me a direction. Thanks

ADmad commented 9 years ago

@rachid804 This is not a help forum. You can post a question on stackoverflow.com or join #cakephp IRC channel.

unikapps commented 9 years ago

Ok hanks @ADmad