Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I restrict a search to only meta keywords entries in documents?

0
10 Posted

How do I restrict a search to only meta keywords entries in documents?

0

First of all, you do not do this by using the “keywords” field in the search form. This seems to be a frequent cause of confusion. The “keywords” input parameter to htsearch has absolutely nothing to do with searching meta keywords fields. It actually predates the addition of meta keyword support in 3.1.x. A better choice of name for the parameter would have been “requiredwords”, because that’s what it really means – a list of words that are all required to be found somewhere in the document, in addition to the words the user specifies in the search form.To restrict a search to meta keywords only, you must set all factors other than keywords_factor to 0, and for 3.1.x, you must then reindex your documents. In the 3.2 betas, you can change factors at search time without needing to reindex. Future 3.2 releases will also offer the ability to restrict the search in the query itself.

0

First of all, you do not do this by using the “keywords” field in the search form. This seems to be a frequent cause of confusion. The “keywords” input parameter to htsearch has absolutely nothing to do with searching meta keywords fields. It actually predates the addition of meta keyword support in 3.1.x. A better choice of name for the parameter would have been “requiredwords”, because that’s what it really means – a list of words that are all required to be found somewhere in the document, in addition to the words the user specifies in the search form.As of 3.2.0b5, the most direct way to search for a particular meta keyword is to specify the word as “keyword:“. Similarly, “title:”, “heading:”, and “author:” restrict searches to the respective fields. To search for words in the body of the text, use “text:”.To restrict all search terms to meta keywords only, you can set all factors other than keywords_factor to 0, and for 3.1.x, you must then reindex your documents. In the 3.

0
10

First of all, you do not do this by using the “keywords” field in the search form. This seems to be a frequent cause of confusion. The “keywords” input parameter to htsearch has absolutely nothing to do with searching meta keywords fields. It actually predates the addition of meta keyword support in 3.1.x. A better choice of name for the parameter would have been “requiredwords”, because that’s what it really means – a list of words that are all required to be found somewhere in the document, in addition to the words the user specifies in the search form. To restrict a search to meta keywords only, you must set all factors other than keywords_factor to 0, and for 3.1.x, you must then reindex your documents. In 3.2, you’ll be able to change factors at search time without needing to reindex, as well as offering the ability to restrict the search in the query itself.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.