nextcloud/fulltextsearch_elasticsearch

No results when searching

EVOTk opened this issue · 6 comments

EVOTk commented

Hello

I've installed fulltestsearch, I've done the indexing with elasticsearch but I don't have any search results in Nextcloud.
1694720627732

1694720772828
1694728572880

On the other hand, if inside the Nextcloud container I run the following command ( curl "http://172.18.108.8:9200/my_index/_search?q=CAILLEBOTI" ), to search in ElasticSearch, then it outputs results, and I clearly see my invoce" :

1694720990140

The test shows no problem.
image

I've also opened an exit here nextcloud/fulltextsearch#770 , I don't know where the problem is coming from.

For French-speaking users, I've started a topic here, explaining the configuration method, and the problem :
https://www.forum-nas.fr/threads/nextcloud-ocr-full-text-search-cass%C3%A9.21281/

EVOTk commented

In Nextcloud log, :

{"reqId":"Ic8QjRe3nalbXGWcgGGQ","level":0,"time":"2023-09-24T21:15:47+00:00","remoteAddr":"192.168.2.41","user":"--","app":"PHP","method":"GET","url":"/apps/fulltextsearch/v1/search?request=%7B%22providers%22%3A%5B%22files%22%5D%2C%22options%22%3A%7B%22files_local%22%3A%221%22%2C%22files_extension%22%3A%22%22%7D%2C%22search%22%3A%22CAILLEBOTI%22%2C%22page%22%3A1%7D","message":"Creation of dynamic property OCA\\Welcome\\AppInfo\\Application::$config is deprecated at /config/www/nextcloud/apps/welcome/lib/AppInfo/Application.php#30","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0","version":"27.1.1.0","data":{"app":"PHP"}}
{"reqId":"Ic8QjRe3nalbXGWcgGGQ","level":0,"time":"2023-09-24T21:15:47+00:00","remoteAddr":"192.168.2.41","user":"Evoluzione","app":"fulltextsearch_elasticsearch","method":"GET","url":"/apps/fulltextsearch/v1/search?request=%7B%22providers%22%3A%5B%22files%22%5D%2C%22options%22%3A%7B%22files_local%22%3A%221%22%2C%22files_extension%22%3A%22%22%7D%2C%22search%22%3A%22CAILLEBOTI%22%2C%22page%22%3A1%7D","message":"New search request","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0","version":"27.1.1.0","data":{"app":"fulltextsearch_elasticsearch","searchResult":"{\"[object] (OCA\\FullTextSearch\\Model\\SearchResult)\":{\"OCA\\FullTextSearch\\Model\\SearchResultdocuments\":[],\"OCA\\FullTextSearch\\Model\\SearchResultrawResult\":null,\"OCA\\FullTextSearch\\Model\\SearchResultprovider\":{\"[object] (OCA\\Files_FullTextSearch\\Provider\\FilesProvider)\":{\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderl10n\":\"[object] (OC\\L10N\\LazyL10N)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderconfigService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\ConfigService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderfilesService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\FilesService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProvidersearchService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\SearchService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderextensionService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\ExtensionService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProvidermiscService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\MiscService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderrunner\":null,\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderindexOptions\":null,\"OCA\\Files_FullTextSearch\\Provider\\FilesProvider_setup\":[]}},\"OCA\\FullTextSearch\\Model\\SearchResultplatform\":{\"[object] (OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform)\":{\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformclient\":\"[object] (Elastic\\Elasticsearch\\Client)\",\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformrunner\":null,\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformconfigService\":\"[object] (OCA\\FullTextSearch_Elasticsearch\\Service\\ConfigService)\",\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformindexService\":\"[object] (OCA\\FullTextSearch_Elasticsearch\\Service\\IndexService)\",\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformsearchService\":\"[object] (OCA\\FullTextSearch_Elasticsearch\\Service\\SearchService)\"}},\"OCA\\FullTextSearch\\Model\\SearchResulttotal\":0,\"OCA\\FullTextSearch\\Model\\SearchResultmaxScore\":0,\"OCA\\FullTextSearch\\Model\\SearchResulttime\":0,\"OCA\\FullTextSearch\\Model\\SearchResulttimedOut\":false,\"OCA\\FullTextSearch\\Model\\SearchResultrequest\":{\"[object] (OCA\\FullTextSearch\\Model\\SearchRequest)\":{\"OCA\\FullTextSearch\\Model\\SearchRequestproviders\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestsearch\":\"CAILLEBOTI\",\"OCA\\FullTextSearch\\Model\\SearchRequestemptySearch\":false,\"OCA\\FullTextSearch\\Model\\SearchRequestpage\":1,\"OCA\\FullTextSearch\\Model\\SearchRequestsize\":10,\"OCA\\FullTextSearch\\Model\\SearchRequestauthor\":\"Evoluzione\",\"OCA\\FullTextSearch\\Model\\SearchRequesttags\":[],\"metaTags\":[],\"subTags\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestoptions\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestparts\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestfields\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestlimitFields\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestwildcardFields\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestwildcardFilters\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestregexFilters\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestsimpleQueries\":[]}}}}"}}
{"reqId":"Ic8QjRe3nalbXGWcgGGQ","level":0,"time":"2023-09-24T21:15:47+00:00","remoteAddr":"192.168.2.41","user":"Evoluzione","app":"fulltextsearch_elasticsearch","method":"GET","url":"/apps/fulltextsearch/v1/search?request=%7B%22providers%22%3A%5B%22files%22%5D%2C%22options%22%3A%7B%22files_local%22%3A%221%22%2C%22files_extension%22%3A%22%22%7D%2C%22search%22%3A%22CAILLEBOTI%22%2C%22page%22%3A1%7D","message":"Searching ES","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0","version":"27.1.1.0","data":{"app":"fulltextsearch_elasticsearch","params":"{\"index\":\"my_index\",\"size\":10,\"from\":0,\"_source_excludes\":\"content\",\"body\":{\"query\":{\"bool\":{\"must\":[],\"filter\":[]}},\"highlight\":{\"fields\":{\"content\":\"[object] (stdClass)\",\"parts.comments\":\"[object] (stdClass)\"},\"pre_tags\":[\"\"],\"post_tags\":[\"\"]}}}"}}
{"reqId":"Ic8QjRe3nalbXGWcgGGQ","level":0,"time":"2023-09-24T21:15:48+00:00","remoteAddr":"192.168.2.41","user":"Evoluzione","app":"fulltextsearch_elasticsearch","method":"GET","url":"/apps/fulltextsearch/v1/search?request=%7B%22providers%22%3A%5B%22files%22%5D%2C%22options%22%3A%7B%22files_local%22%3A%221%22%2C%22files_extension%22%3A%22%22%7D%2C%22search%22%3A%22CAILLEBOTI%22%2C%22page%22%3A1%7D","message":"result from ES","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0","version":"27.1.1.0","data":{"app":"fulltextsearch_elasticsearch","result":"{\"[object] (Elastic\\Elasticsearch\\Response\\Elasticsearch)\":{\"*response\":{\"[object] (GuzzleHttp\\Psr7\\Response)\":{\"GuzzleHttp\\Psr7\\ResponsereasonPhrase\":\"OK\",\"GuzzleHttp\\Psr7\\ResponsestatusCode\":200,\"GuzzleHttp\\Psr7\\Responseheaders\":[],\"GuzzleHttp\\Psr7\\ResponseheaderNames\":[],\"GuzzleHttp\\Psr7\\Responseprotocol\":\"1.1\",\"GuzzleHttp\\Psr7\\Responsestream\":\"[object] (GuzzleHttp\\Psr7\\Stream)\"}}}}"}}
{"reqId":"Ic8QjRe3nalbXGWcgGGQ","level":0,"time":"2023-09-24T21:15:48+00:00","remoteAddr":"192.168.2.41","user":"Evoluzione","app":"fulltextsearch_elasticsearch","method":"GET","url":"/apps/fulltextsearch/v1/search?request=%7B%22providers%22%3A%5B%22files%22%5D%2C%22options%22%3A%7B%22files_local%22%3A%221%22%2C%22files_extension%22%3A%22%22%7D%2C%22search%22%3A%22CAILLEBOTI%22%2C%22page%22%3A1%7D","message":"Search Result","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0","version":"27.1.1.0","data":{"app":"fulltextsearch_elasticsearch","searchResult":"{\"[object] (OCA\\FullTextSearch\\Model\\SearchResult)\":{\"OCA\\FullTextSearch\\Model\\SearchResultdocuments\":[],\"OCA\\FullTextSearch\\Model\\SearchResultrawResult\":\"{\\\"took\\\":11,\\\"timed_out\\\":false,\\\"_shards\\\":{\\\"total\\\":1,\\\"successful\\\":1,\\\"skipped\\\":0,\\\"failed\\\":0},\\\"hits\\\":{\\\"total\\\":{\\\"value\\\":0,\\\"relation\\\":\\\"eq\\\"},\\\"max_score\\\":null,\\\"hits\\\":[]}}\",\"OCA\\FullTextSearch\\Model\\SearchResultprovider\":{\"[object] (OCA\\Files_FullTextSearch\\Provider\\FilesProvider)\":{\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderl10n\":\"[object] (OC\\L10N\\LazyL10N)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderconfigService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\ConfigService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderfilesService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\FilesService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProvidersearchService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\SearchService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderextensionService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\ExtensionService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProvidermiscService\":\"[object] (OCA\\Files_FullTextSearch\\Service\\MiscService)\",\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderrunner\":null,\"OCA\\Files_FullTextSearch\\Provider\\FilesProviderindexOptions\":null,\"OCA\\Files_FullTextSearch\\Provider\\FilesProvider_setup\":[]}},\"OCA\\FullTextSearch\\Model\\SearchResultplatform\":{\"[object] (OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform)\":{\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformclient\":\"[object] (Elastic\\Elasticsearch\\Client)\",\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformrunner\":null,\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformconfigService\":\"[object] (OCA\\FullTextSearch_Elasticsearch\\Service\\ConfigService)\",\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformindexService\":\"[object] (OCA\\FullTextSearch_Elasticsearch\\Service\\IndexService)\",\"OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatformsearchService\":\"[object] (OCA\\FullTextSearch_Elasticsearch\\Service\\SearchService)\"}},\"OCA\\FullTextSearch\\Model\\SearchResulttotal\":0,\"OCA\\FullTextSearch\\Model\\SearchResultmaxScore\":0,\"OCA\\FullTextSearch\\Model\\SearchResulttime\":11,\"OCA\\FullTextSearch\\Model\\SearchResulttimedOut\":false,\"OCA\\FullTextSearch\\Model\\SearchResultrequest\":{\"[object] (OCA\\FullTextSearch\\Model\\SearchRequest)\":{\"OCA\\FullTextSearch\\Model\\SearchRequestproviders\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestsearch\":\"CAILLEBOTI\",\"OCA\\FullTextSearch\\Model\\SearchRequestemptySearch\":false,\"OCA\\FullTextSearch\\Model\\SearchRequestpage\":1,\"OCA\\FullTextSearch\\Model\\SearchRequestsize\":10,\"OCA\\FullTextSearch\\Model\\SearchRequestauthor\":\"Evoluzione\",\"OCA\\FullTextSearch\\Model\\SearchRequesttags\":[],\"metaTags\":[],\"subTags\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestoptions\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestparts\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestfields\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestlimitFields\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestwildcardFields\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestwildcardFilters\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestregexFilters\":[],\"OCA\\FullTextSearch\\Model\\SearchRequestsimpleQueries\":[]}}}}"}}

I noticed this morning that I've had no results from my searches either.

occ fulltextsearch:test :

Creating mocked content provider. ok
Testing mocked provider: get indexable documents. (2 items) ok
Loading search platform. (Elasticsearch) ok
Testing search platform. ok
Locking process ok
Removing test. ok
Pausing 3 seconds 1 2 3 ok
Initializing index mapping. ok
Indexing generated documents. ok
Pausing 3 seconds 1 2 3 ok
Retreiving content from a big index (license). (size: 32386) ok
Comparing document with source. ok
Searching basic keywords:

  • 'test' (result: 0, expected: ["simple"]) fail
    Error detected, unlocking process ok
    In Test.php line 676:

Unexpected SearchResult: {"provider":{"id":"test_provider","name":"Test Provider"},"platform":{"id":"elastic_search","name":"Elasticsearch"},"documents"
:[],"info":[],"meta":{"timedOut":false,"time":1,"count":0,"total":0,"maxScore":0}}

I solved the problem by stopping the indexing, doing a reset (and deleting the elasticsearch index) and re-indexing all my files. It took most of the day but it's working again.

EVOTk commented

As far as I'm concerned, my problem is still there

It was working on my setup until I uploaded a large map file which made it freeze for ages.

I nuked my setup and did everything from scratch. Unfortunately, fulltextsearch didn't work. I nuked it again and tried all settings with no luck.

The indexing is working fine. Similar to Original Poster, if I search through command line or API, it'll return results.

However, it'll not return any results from the browser nor ios app.

No errors in the logs at all. In the browser console it'll return 404 not found error.

EVOTk commented

Hello,
After latest update* , i'm have results !

image

Full text search 27.0.2
Full text search - Elasticsearch Platform 27.0.4

the layout isn't very pretty, but maybe that's the theme. i'll open a new ticket if need be.