meilisearch icon indicating copy to clipboard operation
meilisearch copied to clipboard

Problem Searchable & Unsearchable with v1.6.1 & v1.6.2

Open seifrached opened this issue 1 year ago • 12 comments

My problem is that I am using the switch that toggle the record HIDE/VISIBLE and all its relationship, but after modifying the record it only shows relationship.

Notice: There is no such problem with version 1.5.1, problem only occurs with this version 1.6.1 and 1.6.2

Meilisearch version: v1.6.1 & v1.6.2

Système d’exploitation 64 bits processeur x64 Laptop Windows 11 Chrome Version 121.0.6167.161 (Build officiel) (64 bits)

seifrached avatar Feb 17 '24 22:02 seifrached

Hello @seifrached

Can you provide a reproducible example with detailed steps please? We need this to reproduce the bug.

Which documents do you send to Meilisearch? What do you try to do next? What do you get? What would you expect?

Thank you

curquiza avatar Feb 19 '24 06:02 curquiza

Hello @curquiza

When I decide to make some records non-searchable after editing them, they don't appear, but if I don't edit them, no problem.

seifrached avatar Feb 19 '24 21:02 seifrached

Hello @seifrached I still don't understand exactly what you mean

Can you show a concrete a example with documents you send and the query you do?

curquiza avatar Feb 20 '24 08:02 curquiza

Hello @seifrached, @curquiza is not available this week. I'll answer your comment.

It seems that the update has not been processed. Could you please copy past the /task route?

My second question is: what is your document shape and which field is used to filter out the documents?

Thank you!

ManyTheFish avatar Feb 21 '24 13:02 ManyTheFish

@ManyTheFish Thanks for intervening

/tasks

{"results":[{"uid":6684,"indexUid":"propertys","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.100025400S","enqueuedAt":"2024-02-21T15:14:21.0533757Z","startedAt":"2024-02-21T15:14:21.2279586Z","finishedAt":"2024-02-21T15:14:21.327984Z"},{"uid":6683,"indexUid":"bookmarks","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":101,"indexedDocuments":101},"error":null,"duration":"PT0.093985600S","enqueuedAt":"2024-02-21T15:14:20.9284464Z","startedAt":"2024-02-21T15:14:21.4745151Z","finishedAt":"2024-02-21T15:14:21.5685007Z"},{"uid":6682,"indexUid":"images","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.082209300S","enqueuedAt":"2024-02-21T15:14:20.8110261Z","startedAt":"2024-02-21T15:14:21.3603077Z","finishedAt":"2024-02-21T15:14:21.442517Z"},{"uid":6681,"indexUid":"propertys","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.100025400S","enqueuedAt":"2024-02-21T15:14:20.7217379Z","startedAt":"2024-02-21T15:14:21.2279586Z","finishedAt":"2024-02-21T15:14:21.327984Z"},{"uid":6680,"indexUid":"users","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.417201400S","enqueuedAt":"2024-02-21T15:14:20.6073947Z","startedAt":"2024-02-21T15:14:20.806317Z","finishedAt":"2024-02-21T15:14:21.2235184Z"},{"uid":6679,"indexUid":"propertys","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.101422900S","enqueuedAt":"2024-02-21T15:14:20.4336339Z","startedAt":"2024-02-21T15:14:20.4590947Z","finishedAt":"2024-02-21T15:14:20.5605176Z"},{"uid":6678,"indexUid":"propertys","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.101422900S","enqueuedAt":"2024-02-21T15:14:20.2789544Z","startedAt":"2024-02-21T15:14:20.4590947Z","finishedAt":"2024-02-21T15:14:20.5605176Z"},{"uid":6677,"indexUid":"users","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.417201400S","enqueuedAt":"2024-02-21T15:14:20.0794393Z","startedAt":"2024-02-21T15:14:20.806317Z","finishedAt":"2024-02-21T15:14:21.2235184Z"},{"uid":6676,"indexUid":"bookmarks","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":101,"indexedDocuments":101},"error":null,"duration":"PT0.125412200S","enqueuedAt":"2024-02-21T15:14:19.8938214Z","startedAt":"2024-02-21T15:14:20.6488102Z","finishedAt":"2024-02-21T15:14:20.7742224Z"},{"uid":6675,"indexUid":"images","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.092700800S","enqueuedAt":"2024-02-21T15:14:19.7169203Z","startedAt":"2024-02-21T15:14:19.7534819Z","finishedAt":"2024-02-21T15:14:19.8461827Z"},{"uid":6674,"indexUid":"propertys","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.101422900S","enqueuedAt":"2024-02-21T15:14:19.6680112Z","startedAt":"2024-02-21T15:14:20.4590947Z","finishedAt":"2024-02-21T15:14:20.5605176Z"},{"uid":6673,"indexUid":"users","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.419562800S","enqueuedAt":"2024-02-21T15:14:19.4964471Z","startedAt":"2024-02-21T15:14:20.0348842Z","finishedAt":"2024-02-21T15:14:20.454447Z"},{"uid":6672,"indexUid":"propertys","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.101422900S","enqueuedAt":"2024-02-21T15:14:19.3004842Z","startedAt":"2024-02-21T15:14:20.4590947Z","finishedAt":"2024-02-21T15:14:20.5605176Z"},{"uid":6671,"indexUid":"images","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.092700800S","enqueuedAt":"2024-02-21T15:14:19.1278581Z","startedAt":"2024-02-21T15:14:19.7534819Z","finishedAt":"2024-02-21T15:14:19.8461827Z"},{"uid":6670,"indexUid":"propertys","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.101422900S","enqueuedAt":"2024-02-21T15:14:19.0872362Z","startedAt":"2024-02-21T15:14:20.4590947Z","finishedAt":"2024-02-21T15:14:20.5605176Z"},{"uid":6669,"indexUid":"users","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.419562800S","enqueuedAt":"2024-02-21T15:14:18.9416217Z","startedAt":"2024-02-21T15:14:20.0348842Z","finishedAt":"2024-02-21T15:14:20.454447Z"},{"uid":6668,"indexUid":"bookmarks","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":101,"indexedDocuments":101},"error":null,"duration":"PT0.114868400S","enqueuedAt":"2024-02-21T15:14:18.7597485Z","startedAt":"2024-02-21T15:14:19.8828301Z","finishedAt":"2024-02-21T15:14:19.9976985Z"},{"uid":6667,"indexUid":"images","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.092700800S","enqueuedAt":"2024-02-21T15:14:18.5810068Z","startedAt":"2024-02-21T15:14:19.7534819Z","finishedAt":"2024-02-21T15:14:19.8461827Z"},{"uid":6666,"indexUid":"propertys","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.861673800S","enqueuedAt":"2024-02-21T15:14:18.5361531Z","startedAt":"2024-02-21T15:14:18.8854654Z","finishedAt":"2024-02-21T15:14:19.7471392Z"},{"uid":6665,"indexUid":"users","status":"succeeded","type":"documentAdditionOrUpdate","canceledBy":null,"details":{"receivedDocuments":1,"indexedDocuments":1},"error":null,"duration":"PT0.116696400S","enqueuedAt":"2024-02-21T15:14:18.3761215Z","startedAt":"2024-02-21T15:14:18.7206164Z","finishedAt":"2024-02-21T15:14:18.8373128Z"}],"total":6685,"limit":20,"from":6684,"next":6664}

This is my settings

 'meilisearch' => [
        'host' => env('MEILISEARCH_HOST','http://localhost:7700'),  
        'key' => env('MEILISEARCH_KEY',null),      
        'index-settings' => [
            Property::class => [
                'distinctAttribute' => null, //or ID

                'filterableAttributes'=> [
                    '_geo',
                    'user_id',
                    'uniqueid',
                    'status',
                    'type',
                    'city',
                    'state',
                    'area',
                    'price',
                    'rooms',
                    'bedrooms',
                    'bathrooms',
                    'building_age',
                    'air_conditioning',
                    'swimming_pool',
                    'central_heating',
                    'laundry_room',
                    'gym',
                    'alarm',
                    'window_covering',
                    'created_at',
                    'updated_at',
                ],
                'sortableAttributes'=>['price','created_at'],
                   
            ]
]

seifrached avatar Feb 21 '24 15:02 seifrached

@seifrached, you change the document visibility by deleting the document, right?

We may have an issue on our side. Why don't you use a filterable attribute visibility to filter on the search side instead of deleting the document? it would be a workaround. 😄

ManyTheFish avatar Feb 21 '24 16:02 ManyTheFish

@ManyTheFish

I’m accessing directly to my documents with meilisearch for speed request, scout more slowly 😛

I hope that this small problem will not remain in the coming version, and I thank all the team for their keenness to improve this project

seifrached avatar Feb 21 '24 17:02 seifrached

Hello @seifrached, What are the curl requests made behind to ask Meilisearch to hide or make a document visible? I'd like to reproduce your issue on my side.

Meilisearch tasks are asynchronous, meaning that it may not have finished processing the task when you checked if the document was visible.

thanks

ManyTheFish avatar Feb 22 '24 14:02 ManyTheFish

@ManyTheFish I made requesst only for fetching data from Meilisearch, but in my case i use basic laravel HTTP Requests to delete "Record", but will to try to do a Curl query and let you know what happened.

public function toggleVisibility($id){
        
        $property = Property::withTrashed()->findOrFail($id);
        if (Auth::check()){
            if ($property->trashed()){                          
                $property->restore();
                $response = ['status'=>true,'visibility'=>'visible'];
            }else{
                $property->delete(); 
                $response = ['status'=>true,'visibility'=>'hidden','deleted_at'=> $property->deleted_at];
            }
            return $response;
        }
        return false;
    }

seifrached avatar Feb 22 '24 14:02 seifrached

@seifrached do you still have the issue with v1.8.0?

curquiza avatar May 22 '24 12:05 curquiza

@seifrached do you still have the issue with v1.8.0?

Yes 😒

seifrached avatar May 22 '24 22:05 seifrached

Hello @seifrached

We worked on this issue with @ManyTheFish again, and we really don't understand your problem. We need a reproducible example to fix your issue, and we don't have it at the moment.

What is a reproducible example of "making some records unsearchable"?

  • which documents did you add?
  • which settings do you have? (we have them ✅)
  • which queries do you send? What do you get? What would you expect instead?

Can you please provide it?

curquiza avatar May 29 '24 10:05 curquiza