Hi guys,
I have been trying to build a faceted search and it works pretty well so 
far. There is just one problem that I have been struggling with in the last 
few days. 

It is a multinational jobsearch and the jobs are categorized under a 
country and a state. I want to be able to search for different states in 
different countries (It could happen in the EU, where some people would be 
interested to work abroad in a neighboring district). 

So what I tried out was this tutorial 
http://www.springyweb.com/2012/01/hierarchical-faceting-with-elastic.html . 
I skipped the part with the new tokenizer, as I don't care about the number 
of the level. 

Unfortunately it didn't work. The fields seems to get tokenized, since when 
I search for regexp "44" it finds /44/10, if I search for "10" it finds 
/44/10, but if I search for "/44" or "44.*" I get 0 hits.

Then I removed the path_tokenizer and tried to work with a not_analyzed 
string, hoping that it would do the job, but again it didn't work out.

What am I doing wrong? This is the mapping: The field is locations_path

https://gist.github.com/anonymous/8805721

{
    "vacancy": {
        "index_analyzer": "indexAnalyzer",
        "search_analyzer": "searchAnalyzer",
        "_boost": {
            "name": "_boost",
            "null_value": 1
        },
        "properties": {
            "vId": {
                "type": "integer",
                "include_in_all": false
            },
            "title": {
                "type": "string",
                "include_in_all": true
            },
            "teaser": {
                "type": "string",
                "include_in_all": true
            },
            "keywords": {
                "type": "multi_field",
                "include_in_all": true
            },
            "completion": {
                "type": "completion",
                "analyzer": "standard"
            },
            "description": {
                "type": "string",
                "include_in_all": true
            },
            "company": {
                "type": "multi_field",
                "include_in_all": true
            },
            "company_id": {
                "type": "multi_field",
                "include_in_all": false
            },
            "workingSchedule": {
                "type": "object",
                "properties": {
                    "de": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "ch": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "pl": {
                        "type": "string",
                        "include_in_all": true
                    }
                }
            },
            "careerPosition": {
                "type": "object",
                "properties": {
                    "de": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "ch": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "pl": {
                        "type": "string",
                        "include_in_all": true
                    }
                }
            },
            "jobExperience": {
                "type": "object",
                "properties": {
                    "de": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "ch": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "pl": {
                        "type": "string",
                        "include_in_all": true
                    }
                }
            },
            "seniority": {
                "type": "object",
                "properties": {
                    "de": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "ch": {
                        "type": "string",
                        "include_in_all": true
                    },
                    "pl": {
                        "type": "string",
                        "include_in_all": true
                    }
                }
            },
            "subjects": {
                "type": "multi_field",
                "include_in_all": false
            },
            "subjects_fulltext": {
                "type": "object",
                "properties": {
                    "de": {
                        "type": "multi_field",
                        "include_in_all": true
                    },
                    "ch": {
                        "type": "multi_field",
                        "include_in_all": true
                    },
                    "pl": {
                        "type": "multi_field",
                        "include_in_all": true
                    }
                }
            },
            "locations_path": {
                "type": "string",
                "include_in_all": false,
                "index": "not_analyzed"
            },
            "locations": {
                "type": "multi_field",
                "include_in_all": false
            },
            "locations_fulltext": {
                "type": "multi_field",
                "include_in_all": true
            },
            "categories": {
                "type": "multi_field",
                "include_in_all": false
            },
            "categories_fulltext": {
                "type": "object",
                "properties": {
                    "de": {
                        "type": "multi_field",
                        "include_in_all": true
                    },
                    "ch": {
                        "type": "multi_field",
                        "include_in_all": true
                    },
                    "pl": {
                        "type": "multi_field",
                        "include_in_all": true
                    }
                }
            },
            "careerPosition_id": {
                "type": "multi_field",
                "include_in_all": false
            },
            "workingSchedule_id": {
                "type": "multi_field",
                "include_in_all": false
            },
            "jobExperience_id": {
                "type": "multi_field",
                "include_in_all": false
            },
            "seniority_id": {
                "type": "multi_field",
                "include_in_all": false
            }
        }
    }
}

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/bf626da9-3ff8-4f1e-9977-f29ba54429df%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to