Hey everyone, I am trying to create search suggest...
# community-help
s
Hey everyone, I am trying to create search suggestions but i am having problems. I already have a collection named as
Copy code
hotels_new
with over around 173000 data. and the search is perfectly working fine but since I am trying to create search suggestions. So, I run the following and the rules and the hotels_new queries are perfectly created without any error. I checked the queries it has initially 0 number of documents. The issue currently is when I do search on the hotels_new the hotels_new_queries isn't being updated. I have a Lightsail server hosted with the following configurations Typesense Setup
Copy code
hotels_new_queries = {
    "name": "hotels_new_queries",
    "fields": [
        {"name": "q", "type": "string"},
        {"name": "count", "type": "int64"}
    ]
}

client.collections.create(hotels_new_queries)

rule_name = 'hotels_new_queries_aggregation'
rule_configuration = {
    "type": "popular_queries",
    "params": {
        "source": {
            "collections": ["hotels_new"]
        },
        "destination": {
            "collection": "hotels_new_queries"
        },
        "expand_query": False,
        "limit": 1000
    }
}

print(client.analytics.rules.upsert(rule_name, rule_configuration))
LightSail typesense.ini configuration
Copy code
; Typesense Configuration
[server]
api-address = 0.0.0.0
api-port = 8108
data-dir = /var/lib/typesense
api-key = api_key_working_fine
log-dir = /var/log/typesense
enable-search-analytics = true
analytics-dir = /var/lib/typesense/analytics
analytics-flush-interval = 60
Also I checked the logs, everything seems fine and there is nothing unusual. Along with I also checked the /var/lib/typesense, all the files and permissions are same. I also checked after flush interval but nothing, the number of documents is 0. What can I try next?