elastica

ElasticSearch - Searching with hyphens in name

有些话、适合烂在心里 提交于 2019-11-29 10:52:17
I have a product catalog which I am indexing in ElasticSearch using the Elastica client. I am very new to ElasticSearch BTW. There are products in my catalog which have 't-shirt' in their names. But, they won't appear in search results if I type 'tshirt' . What can I do so that 't-shirt' can also pop-up in results? I have followed this tutorial and implemented the following for indexes: 'analysis' => array( 'analyzer' => array( 'indexAnalyzer' => array( 'type' => 'custom', 'tokenizer' => 'whitespace', 'filter' => array('lowercase', 'mySnowball') ), 'searchAnalyzer' => array( 'type' => 'custom'

Elasticsearch relationship mappings (one to one and one to many)

╄→尐↘猪︶ㄣ 提交于 2019-11-28 05:22:46
In my elastic search server I have one index http://localhost:9200/blog . The (blog) index contains multiple types. e.g.: http://localhost:9200/blog/posts , http://localhost:9200/blog/tags . In the tags type I have created more than 1000 tags and 10 posts created in posts type. e.g.: posts { "_index":"blog", "_type":"posts", "_id":"1", "_version":3, "found":true, "_source" : { "catalogId" : "1", "name" : "cricket", "url" : "http://www.wikipedia/cricket" } } e.g.: tags { "_index":"blog", "_type":"tags", "_id":"1", "_version":3, "found":true, "_source" : { "tagId" : "1", "name" : "game" } } I

ElasticSearch - Searching with hyphens in name

半腔热情 提交于 2019-11-28 03:57:17
问题 I have a product catalog which I am indexing in ElasticSearch using the Elastica client. I am very new to ElasticSearch BTW. There are products in my catalog which have 't-shirt' in their names. But, they won't appear in search results if I type 'tshirt' . What can I do so that 't-shirt' can also pop-up in results? I have followed this tutorial and implemented the following for indexes: 'analysis' => array( 'analyzer' => array( 'indexAnalyzer' => array( 'type' => 'custom', 'tokenizer' =>