meilisearch
meilisearch copied to clipboard
Problem Searchable & Unsearchable with v1.6.1 & v1.6.2
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)
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
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.
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?
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 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, 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
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
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 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 do you still have the issue with v1.8.0?
@seifrached do you still have the issue with v1.8.0?
Yes 😒
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?