ruflin / Elastica

Elastica is a PHP client for elasticsearch
http://elastica.io/
MIT License
2.26k stars 736 forks source link

the doc is more than outdated #2116

Closed rudak closed 2 years ago

rudak commented 2 years ago

I discover elasticsearch and ruflin, it's great but it seems that the doc is far from being up to date, which really complicates things. Is it planned that someone modify a little the few examples proposed?

$es_text1 = new Elastica_Query_Text();
$es_text1 -> setField("title", "hello");
$es_text2 = new Elastica_Query_Text();
$es_text2 -> setField("post_text", "hello");
$es_child = new Elastica_Query_HasChild($es_text2, "post");

$es_bool = new Elastica_Query_Bool();
$es_bool ->addShould($es_text1);
$es_bool ->addShould($es_child);

$es_query = new Elastica_Query($es_bool);
$q = $es_query->toArray();
echo json_encode($q);
$es_search = new Elastica_Search($elastica_client);
$rs = $es_search->addIndex('forum')->search($es_query, 10);

some of these classes are only mentioned in changelogs older than 10 years but are not available for use or deprecated so i think we should clean up a little bit. :)
that would be great, thanks in advance

ruflin commented 2 years ago

Hi @rudak Unfortunately you are right and the docs have had very little attention over the past few years :-( I was debating with myself if it would maybe even better to take it down instead of having outdated docs. All the docs are here in this github repo: https://github.com/ruflin/elastica.io Any chance you are interested to do a quick cleanup with a PR so we can update at least the worst parts?

rudak commented 2 years ago

Yes @ruflin , it's a possibility. I'll try to see what I can change when I'm more sure of what I'm doing. Little by little, we should be able to put it back together. see you soon

ruflin commented 2 years ago

Great to hear @rudak Thanks!