Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-11-12 20:21:06

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 317
Website GitHub GitLab Mastodon Twitter

Incomplete search

Why are some words not found by Textpattern search?

The website is still under development, no English version so far, sorry. For an example, there are two sentences in the first paragraph on this page (in Lithuanian language):
km.on.lt/kadastriniai-matavimai/

Įmonėje dirba aukštos kvalifikacijos matininkai, inžinieriai geodezininkai ir kadastrininkai. Matavimams ir topografijai taikomi šiuolaikiniai geodeziniai ir lazeriniai prietaisai, specializuota programine įranga.

Let us look for words in plain ASCII letters only.

  1. A query for dirba is successful (found on the second link of http://km.on.lt/?q=dirba);
  2. matininkai are there too, in a right place;
  3. the third word (in the end of the same sentence), kadastrininkai — not found;
  4. Matavimams (in a beginning of the second sentence) — found again;
  5. but the next word taikomi (witch was already excerpted in search results by the previous query) — not found.

I am confused, please point me to the right way.

Offline

#2 2017-11-12 22:21:29

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: Incomplete search

Where does the text of km.on.lt/kadastriniai-matavimai/ (containing the word “kadastrininkai”) is coming from? The search for dirba links to km.on.lt/kadastriniai-matavimai/kadastriniai-matavimai, not km.on.lt/kadastriniai-matavimai/. Edit: though finally the first link is redirected to the second one.

Offline

#3 2017-11-13 05:22:43

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 317
Website GitHub GitLab Mastodon Twitter

Re: Incomplete search

Yes, because it is sticky article and thus is 301 redirected to its section’s “Kadastriniai Matavimai” URL.

Last edited by Vienuolis (2017-11-13 05:37:22)

Offline

#4 2017-11-13 08:48:53

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: Incomplete search

A bit strange, but try adding searchsticky="1" to <txp:article />.

Offline

#5 2017-11-13 09:00:28

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 317
Website GitHub GitLab Mastodon Twitter

Re: Incomplete search

Yes, ‘sticky’ is set there:

	<txp:article searchsticky="1" limit="25" wraptag="dl">
<dt><strong><txp:search_result_title /></strong></dt>
<dd><txp:search_result_excerpt /></dd>
	</txp:article>

Offline

#6 2017-11-13 09:08:51

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 317
Website GitHub GitLab Mastodon Twitter

Re: Incomplete search

New I’ve expanded the limit to 999 (although the word ‘kadastrininkai’ in this website is mentioned only once) — not found yet.

Offline

#7 2017-11-13 09:16:06

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: Incomplete search

Weird, if I copy the text of this article, kadastrininkai is found for me. Check if <txp:if_search_results /> in search_form has min attribute by any chance? It looks like the search on your site outputs only multiple matches.

Offline

#8 2017-11-13 09:32:35

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 317
Website GitHub GitLab Mastodon Twitter

Re: Incomplete search

Neither min nor max was set, as by default. Now I’ve set <txp:if_search_results min="1"> — the same search results, ‘kadastrininkai’ still not found.

Offline

#9 2017-11-13 09:37:10

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 317
Website GitHub GitLab Mastodon Twitter

Re: Incomplete search

Wow! The search works correctly now, when I have set min="0". Thank you very much, dear Oleg!

Offline

#10 2017-11-13 09:45:18

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: Incomplete search

No, wait Vladas, it’s still weird that the default min="1" works for me, but not for you. Could you run the diagnostics, to see if some files have not been modified? Thanks!

Offline

#11 2017-11-13 09:54:40

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 317
Website GitHub GitLab Mastodon Twitter

Re: Incomplete search

Two warnings, both for my non-Apache webserver (Hiawatha) only. Diagnostics: Pre-flight check:

Clean URLs are only supported on Apache, use at your own risk. (i)
.htaccess file is missing (i)

Offline

#12 2017-11-13 10:12:20

etc
Developer
Registered: 2010-11-11
Posts: 5,397
Website GitHub

Re: Incomplete search

Now (with min="0") you land on the search page even if there is no search results. Something strange is happening on your site, but I can not reproduce the issue. By any chance, have you put <txp:if_search_results /> before <txp:article />? This will work in 4.7, but not in 4.6.2.

Edit: my bet is that you have <txp:article pgonly="1" /> without searchsticky attribute before <txp:if_search_results />. If so, try to add searchsticky="1" and remove min.

Offline

Board footer

Powered by FluxBB