Search autocomplete design

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

justinvichard
Posts: 9
Joined: Thu Apr 16, 2020 11:39 am

Search autocomplete design

Post by justinvichard » Fri Apr 17, 2020 9:40 pm

Hi!

I was wondering if there was a way to change the design of the autocomplete results?

When I write something on the search field, I can see autocomplete results.

But how can I do to make it looks like this?

https://fr.sandro-paris.com/fr/faq-17/faq.html

Thorsten
Posts: 15025
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten » Sun Apr 19, 2020 8:16 am

Hi,

you mean like this?
Bildschirmfoto 2020-04-19 um 09.16.19.png
bye
Thorsten
You do not have the required permissions to view the files attached to this post.
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

justinvichard
Posts: 9
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard » Sun Apr 19, 2020 11:22 pm

Yup!
Exactly ;)

justinvichard
Posts: 9
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard » Mon Apr 20, 2020 10:15 am

I forgot to ask this:

Is that normal that, when I'm seraching something like "my computer doesn't work", I can see the article displaying through the autocomplete?
But nothing is displaying if I use a keyword set up on the article (ex : boot, black, screen)

Thorsten
Posts: 15025
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten » Mon Apr 20, 2020 10:33 am

Hi,

depends... what search technology do you use, the database or Elasticsearch?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

justinvichard
Posts: 9
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard » Mon Apr 20, 2020 9:36 pm

Database for the moment.
But I can use elastic if it can solve my issue ;)

Thorsten
Posts: 15025
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten » Wed Apr 22, 2020 11:01 am

Hi,

the search results are much better with Elasticsearch

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

justinvichard
Posts: 9
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard » Wed Apr 22, 2020 3:22 pm

Great! I will try with elastic.

Is there a way to change the design of the autocomplet results so it looks more than your picture?

Thorsten
Posts: 15025
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten » Wed Apr 22, 2020 4:53 pm

Hi,

it is possible. I played with the code a little bit, but there are some bugs, e.g. https://github.com/bassjobsen/Bootstrap ... issues/131

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

justinvichard
Posts: 9
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard » Wed Apr 29, 2020 5:02 pm

Thanks!

Concerning the autocomplete/elastic issue, i set up an elastic server and configure phpmyfaq to use it.
It's working. All my documents are registered into my index.

But I can't search using keywords :/
2020-04-29 18_00_04-SRV-MDT - TeamViewer.png
2020-04-29 18_00_22-SRV-MDT - TeamViewer.png
2020-04-29 18_00_38-SRV-MDT - TeamViewer.png
You do not have the required permissions to view the files attached to this post.

Thorsten
Posts: 15025
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten » Wed Apr 29, 2020 7:20 pm

Hi,

I'll check it on my test installation.

The code looks good for me: https://github.com/thorsten/phpMyFAQ/bl ... #L148-L198

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

justinvichard
Posts: 9
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard » Thu Apr 30, 2020 3:40 pm

Just to precise, the search system is working.

It's searching for title, content and keywords.

But the autocomplete system only give me result if I look for title.

Thorsten
Posts: 15025
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten » Thu Apr 30, 2020 5:33 pm

Hi,

this is strange as the autocomplete query only filters for the language, the search query for the normal search not...

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

justinvichard
Posts: 9
Joined: Thu Apr 16, 2020 11:39 am

Re: Search autocomplete design

Post by justinvichard » Mon May 04, 2020 4:44 pm

Do you thin my problem can come from a langage issue?
If it is, why can I try to bypass it?

Waht's the purpose of the langage filter?

For the record, i'm french.

Thorsten
Posts: 15025
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Search autocomplete design

Post by Thorsten » Thu May 07, 2020 7:38 am

Hi,

no, it's not language specific, I see the issue on my large test installation as well. And it's not the search query, it's a filter in the typeahead functionality. I'm working on this issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply