ryan Posted July 13, 2018 Share Posted July 13, 2018 Continuing from last week's post, ProcessWire 3.0.108 is now available on the dev branch, and it adds support for a new, more powerful live search in the admin. This week we will take a closer look at how it works, as well as how module developers can make their modules searchable too. https://processwire.com/blog/posts/pw-3.0.108/ 12 Link to comment Share on other sites More sharing options...
Robin S Posted July 13, 2018 Share Posted July 13, 2018 Thanks for the new search features @ryan! I wonder if the keyword to bring up the search help should be something less likely to be typed in by a site editor, e.g. "~help". Because it's not that unlikely that an editor might want to find a page with the word "help" in it. To test I created a page titled "Help" and that was not included in the results when I searched "help". The option to include search results from a module sounds interesting but I'm struggling to think of an existing module that might want to give search results other than pages. Maybe @adrian's Admin Actions module? What sorts of modules do you think would use that feature? 2 Link to comment Share on other sites More sharing options...
szabesz Posted July 14, 2018 Share Posted July 14, 2018 9 hours ago, Robin S said: What sorts of modules do you think would use that feature? Let's say you have custom "non-pw" db tables. 9 hours ago, Robin S said: help should be something less likely to be typed in by a site editor +1 This sprung into my mind too when reading the post. What about being configurable? For example, I would prefer: --? 2 Link to comment Share on other sites More sharing options...
Noel Boss Posted July 14, 2018 Share Posted July 14, 2018 Instead of a command, i'd simply include a ? Icon somewhere in the ui where you can click and get the infos… via tool-tip or toggeling a accodion section or any other form… Or, you could display the help info when clicking into the box right away, the same way spotlight does it: 2 Link to comment Share on other sites More sharing options...
szabesz Posted July 14, 2018 Share Posted July 14, 2018 2 hours ago, Noel Boss said: Instead of a command, i'd simply include a ? Icon somewhere in the ui What about a command AND the icon too? 2 hours ago, Noel Boss said: Or, you could display the help info when clicking into the box right away, the same way spotlight does it: Maybe optionally. I do not like panels automatically covering anything. Link to comment Share on other sites More sharing options...
Noel Boss Posted July 14, 2018 Share Posted July 14, 2018 1 hour ago, szabesz said: I do not like panels automatically covering anything. I did note find a screenshot of Spotlight no the Mac, there it does not cover everything but just an extension below the search field – more or less exactly linke it is now, as a dropdown when you type the help command – as a first row of results. But before the actual results appear and you type anythin. Hmmm... Duckduckgo did not find anything, google does: 1 Link to comment Share on other sites More sharing options...
szabesz Posted July 14, 2018 Share Posted July 14, 2018 31 minutes ago, Noel Boss said: does not cover everything Sure, the example does not cover "everything" but some part of the screen. On a PW edit page, the most important bits of information are usually at the very top, so anything covering that area "automatically" is not something I prefer. Sure, when we start typing results start to cover that area but I'm not fond of covering anything just by getting the focus into the search box. Link to comment Share on other sites More sharing options...
matjazp Posted July 14, 2018 Share Posted July 14, 2018 How could I find the page with specific id? I tried id=1234 but shows 0 results. How do I get the previous page search where I could specify "What pages to show"? Link to comment Share on other sites More sharing options...
zoeck Posted July 15, 2018 Share Posted July 15, 2018 21 hours ago, matjazp said: How could I find the page with specific id? I tried id=1234 but shows 0 results. How do I get the previous page search where I could specify "What pages to show"? pages.id=1234 eventually ? Link to comment Share on other sites More sharing options...
rafaoski Posted July 15, 2018 Share Posted July 15, 2018 @matjazp You can try pages.id==1234 It seems to me that in the settings the search appliance looks for similar expressions instead of identical ones which you change with the operator's ( == ) Link to comment Share on other sites More sharing options...
ryan Posted July 15, 2018 Author Share Posted July 15, 2018 Quote I wonder if the keyword to bring up the search help should be something less likely to be typed in by a site editor, e.g. "~help". Because it's not that unlikely that an editor might want to find a page with the word "help" in it. To test I created a page titled "Help" and that was not included in the results when I searched "help". Maybe we can support other options here, though I'm not going to be able to remember special characters or combinations in this (or be able to easily communicate that to others), just need to keep it as straightforward as possible. I did try "?" but it's too short for autocomplete. I'm not too worried about people not being able to search for "help", as I'm guessing it's pretty rare, and there's already the much more power Pages > Find, if someone can't accomplish something with the live search. Also, this help thing was really about introducing the feature and communicate how to use it in the blog post. I added it last minute as part of writing the blog post, and not certain it's really needed or will stay long term. Though if it did stick around, I suppose it could show a "type 'help' for instructions" link in a tiny dropdown when you are focused in an empty search box. Quote The option to include search results from a module sounds interesting but I'm struggling to think of an existing module that might want to give search results other than pages. Maybe @adrian's Admin Actions module? What sorts of modules do you think would use that feature? Any module that manages items of any sort. In the core, these modules implement the searchable interface: ProcessField, ProcessTemplate, ProcessCommentsManager, ProcessPageType, ProcessUser. I left pages and modules implemented internally, because it ended up being more efficient to do so. I can't speak to other people's modules, but for me I'm adding support in FormBuilder, DatabaseBackups, HannaCode and ProcessWireAPI. Quote How could I find the page with specific id? I tried id=1234 but shows 0 results. How do I get the previous page search where I could specify "What pages to show"? This is primarily a text searching engine. I wasn't thinking folks would search for pages by ID in this search box. But it looks like "id==1001" or "pages.id==1001" does work (like rafaoski mentioned). I'm not sure I understand what you mean about getting your previous search, this sounds more like Lister? 1 Link to comment Share on other sites More sharing options...
matjazp Posted July 15, 2018 Share Posted July 15, 2018 Thanks for the answers! 5 hours ago, zoeck said: pages.id=1234 Tried that and didn't work. 4 hours ago, rafaoski said: You can try pages.id==1234 It seems to me that in the settings the search appliance looks for similar expressions instead of identical ones which you change with the operator's ( == ) Yes, this works. 2 hours ago, ryan said: This is primarily a text searching engine. I wasn't thinking folks would search for pages by ID in this search box. But it looks like "id==1001" or "pages.id==1001" does work (like rafaoski mentioned). I'm not sure I understand what you mean about getting your previous search, this sounds more like Lister? Well, there are all kinds of folks ? If I can enter "title=foo" I expected I could also enter "id=1234"... What I meant with "What pages to show" is Lister eg. this link: /processwire/page/search/ Maybe this should be the default "result" if the search term is empty and you press enter. Now you get "The process returned no content." and that probably isn't very helpful? 3 Link to comment Share on other sites More sharing options...
netcarver Posted July 17, 2018 Share Posted July 17, 2018 Hmmm, if the user doing the search has read permissions to logfiles, could the logs be made searchable without having to drill down into the actual logs page? ? 1 Link to comment Share on other sites More sharing options...
AndZyk Posted July 19, 2018 Share Posted July 19, 2018 First of all thank you @ryan for this great addition. I am a heavy user of the page search and use it more often than the page tree. ? I am not sure if this is a bug, but I think the new page search breaks the autocompletion of users: For example if I type in a username in the page search and select the suggested user, I will be redirected to the 404 page in the front-end with following url:http://example.com/processwire/access/users/username/ Instead the url should be something like this I think:http://example.com/processwire/access/users/edit/?id=123 Can anyone confirm this or is it maybe something on my side? I have noticed this on two different installations of PW 3.0.108. Regards, Andreas 2 Link to comment Share on other sites More sharing options...
adrian Posted July 19, 2018 Share Posted July 19, 2018 @AndZyk - nice catch - I am seeing that problem with users also. 1 Link to comment Share on other sites More sharing options...
AndZyk Posted July 19, 2018 Share Posted July 19, 2018 (edited) Thank you @adrian for confirming. I have opened a issue. ? https://github.com/processwire/processwire-issues/issues/642 Edited July 19, 2018 by cstevensjr Added Issue Link 3 Link to comment Share on other sites More sharing options...
gingebaker Posted July 27, 2018 Share Posted July 27, 2018 (edited) moved to: Edited August 13, 2018 by gingebaker make it an topic in General Support Link to comment Share on other sites More sharing options...
Noel Boss Posted August 15, 2018 Share Posted August 15, 2018 I'm not sure if this is related, but the search also does not display pages anymore for my searches… Also using Page Label Field extensively… Update: @ryan and @kongondo – I've found the culprit, it's when adding RuntimeMarkup fields to the page search fields: https://github.com/processwire/processwire-issues/issues/670 Link to comment Share on other sites More sharing options...
Noel Boss Posted August 15, 2018 Share Posted August 15, 2018 On 7/19/2018 at 8:49 PM, AndZyk said: First of all thank you @ryanI am not sure if this is a bug, but I think the new page search breaks the autocompletion of users: For example if I type in a username in the page search and select the suggested user, I will be redirected to the 404 page in the front-end with following url:http://example.com/processwire/access/users/username/ Instead the url should be something like this I think:http://example.com/processwire/access/users/edit/?id=123 Can anyone confirm this or is it maybe something on my side? I've also had this problem and opened an issue on github: https://github.com/processwire/processwire-issues/issues/672 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