How do I restrict a search to only meta keywords entries in documents?
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.
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:
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.