antpre Posted May 9, 2020 Share Posted May 9, 2020 Hello, I am implementing a simple search function with the help of the cache field. The implementation works but the results I get out of the selector search is not right. Some page are correctly returned by the search but other pages that I would expect to be included in the research result are note included. My cache field included a few fields and some of them are pagefields. I looked in the database table for that field and i notice that the pagefields value that are stored in the cache field are the id of the page referenced by these page fields. as a result if in the search function i type the id of the page field reference I get the proper result. But if I type the name of the page field reference I don't get any result. Is there a way that the cache field aggregates the name of the page fields reference instead of its id. Thanks in advance Regards Link to comment Share on other sites More sharing options...
adrian Posted May 9, 2020 Share Posted May 9, 2020 Not really answering your question, but I think these days, this module (http://modules.processwire.com/modules/search-engine/) by @teppo might be a better approach to what you're trying to achieve. Link to comment Share on other sites More sharing options...
mahu Posted May 9, 2020 Share Posted May 9, 2020 I guess, the not found pages use another template than the found ones. I will say, that you have to add the cache field to all templates that should be searchable. Link to comment Share on other sites More sharing options...
antpre Posted May 10, 2020 Author Share Posted May 10, 2020 @Adrian : tks a lot for pointing out this module. I am trying it rigth now. @Mahu:tks but no. all the pages I am searching share the same template. I guess It has to do with how the pagefields are managed by the cache field. I also added to the cache search field the template that the pagefield are referencing. But it didn't change anything. Hoping Teppo's module will solve my problem. Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now