Closed darthf1 closed 2 years ago
Hey,
We could even get rid of getIndexNameFromClass
, the idea is to make a is_class
check on the string and if it's true (so it's a DTO), then we get the index name from the mapping and if it's false, we use the actual method (based on index alias or true name).
Hey, We could even get rid of
getIndexNameFromClass
, the idea is to make ais_class
check on the string and if it's true (so it's a DTO), then we get the index name from the mapping and if it's false, we use the actual method (based on index alias or true name).
Yeah even better
Maybe #91 fixed that issue.
I will consider this issue fixed as you don't provide more feedback :+1: thanks for the report!
Hi!
I don't like to pass my ES mapping around in various classes, so I make extensive use of
This returns the prefixed index name for a specific class.
After indexing, I want to manually refresh the index:
The issue I'm having with the refresh function, is that it needs the unprefixed index name, because it will prepend this index name with the prefix.
refresh()
: https://github.com/jolicode/elastically/blob/v1.3.0/src/Indexer.php#L119 callsgetIndex()
https://github.com/jolicode/elastically/blob/v1.3.0/src/Client.php#L71 which unconditionally adds the prefix.However, (as far as I can see) there's no way to get the unprefixed index name from a class. But it would be even better, if I can just pass the prefixed index name to the refresh function.