typesense / typesense-docsearch-scraper

A fork of Algolia's awesome DocSearch Scraper, customized to index data in Typesense (an open source alternative to Algolia)
https://typesense.org/docs/guide/docsearch.html
Other
101 stars 36 forks source link

Support configurable `locale` on creating one collections's fields. #21

Closed PupilTong closed 1 year ago

PupilTong commented 1 year ago

Description

Related Issue: https://github.com/typesense/typesense/issues/267

Related Code: https://github.com/typesense/typesense-docsearch-scraper/blob/a005d7a8bbd45bd71fd3895024f05663e9f797c6/scraper/src/typesense_helper.py#L34-L53

The scraper doesn't set the locale property on creating fields, which makes chinese words searching doesn't work as expected.

Steps to reproduce

just run the scraper and typesense docker image 0.23.1

stoneqq11 commented 1 year ago

i hava the same trubbel

Markeli commented 1 year ago

Yeah, me to! I think configuring locale via environment variables would be very simple solution. Similar to providing host, port and rest parameters for typesesne client.

image

@jasonbosco, I can make a PR if you agree with this solution.

jasonbosco commented 1 year ago

@Markeli Great idea! I was thinking of a more complicated solution, but yours is much simpler. A PR would be great!

Markeli commented 1 year ago

@jasonbosco, I've made a PR.

jasonbosco commented 1 year ago

Thanks @Markeli! Just merged it in.

Markeli commented 1 year ago

@jasonbosco, could you, please, push new image of scrapper to dockerhub?

jasonbosco commented 1 year ago

@Markeli Done.