Extensis Logo SUPPORT | FORUMS | KNOWLEDGE BASE

One search field that searches all


#1

Hi all,

Is it possible to have one search box that searches all standard and custom fields (I’ve got 27 fields in total)? I’m using the ImagePro template if that helps.

Many thanks,

Scott.


#2

You can edit quickfind.xml in Portfolio Server (see manual) and the NP ‘quickfind’ command will use the same search scope; the default fields are Description/Keywords/Filename. However, the vendor has always recommended not using more than 5 search terms. The intimation has always been that much more complex queries will have a significant impact on performance. I don’t think web searches live-search everything on the fly but cache data to improve performance. If you need to search 27 fields to get usable results, it’s probably Nature’s way of saying your keywording is sub-omptimal. Also bear in mind that Text block fields, including the built-in Description, aren’t indexed and cannot be searched for a phrase in one search term. a quickfind is a single term search across N fields as each search argument can only target one field. Thus a default quickfind is a three argument query using the same search value.


#3

That was the route I was going to initially take however in the manual it says that changes made to the quickfind.xml file don’t have any effect on NP -only the Web and Desktop clients are effected.


#4

NP not using the Portfolio Server’s customised quickfind was true in v9 but NP caught up at v10.0, IIRC. Anyway, it should work in the current v10.2.


#5

Cheers for that Mark but I’m having no luck and btw we’ve resorted to only search 4 fields rather than the 27 originally mentioned.

Quickfind is picking up the custom fields within the Web and Desktop clients but not NP.
What I did was:

  1. Locate the quickfind.xml file ‘\Portfolio Server\data\quickfind.xml’
  2. Add the below to the bottom of the xml file


    Title
    Parent work title
    Description
    Author(s)/Creator(s)

  3. Saved the file and restarted the NP and Portfolio services.

Like I say the changes have been picked up within the desktop and web clients but not NP.

I better mention, we’re using 10.0.0.25.

Any further suggestions…

Thanks,

Scott.


#6

Now I’ve had a chance to test, no joy here either. It must still be waiting to be implemented (properly). The hard part is so few app changes get properly documented in release notes, it gets hard to track properly intended fixes/updates that don’t then get released. So I guess it’s a ‘feature request’ right now.


#7

Well here’s hoping that it’s included in V11.


#8

Just to clarify. The Portfolio Server 10.2 Administration Guide explains how to configure the quickfind.xml and as noted above states that:

That is the expected behaviour therefore. We got many requests to have a more ‘Google like search’ capability and so with version 10 NetPublish the way QuickFind works was changed. In older templates the QuickFind would search on filename/keywords/description from the one box, but consequently did not search on multiple terms when entered in the one box. With version 10 templates it can now:

[quote]Allow greater control of QuickFind results using quotes and multi-keyword search phrases (all templates)
Expose available files using a QuickFind box that predictively fills with keyword choices (tablet template only)[/quote]

So it no longer runs a QuickFind on the 3 fields that older version templates did, but focuses purely on keywords searching, but with the added benefit of searching in one box on multiple keyword terms, and controlling the type of search with and/or criteria and quotes for exact matches. Whether that behaviour can be replaced with the ‘QuickFind’ function is beyond my knowledge of NetPublish, so is best taken up with technical support directly. I imagine it’s not possible, but that you could remove the built-in ‘QuickFind’ box from your template/site and replace it with your own ‘Find’ box that is set to run on the fields you want it to.


#9

To take up Chris’ point re a custom coded quickfind, yes it is possible, though for performance sake I’d not try to run it across loads of fields. The manual would say 5 max, more is possible. There is no ‘gated’ max but rather performance will tail off - results returned more slowly - or NP will simply become completely unresponsive - working but serving nothing (sometime you get Err #500 pages as the webserver gives up waiting).

Anyway, you can make a search page with one input both and then either ad in the other query data via HTML form and client side javascript or, perhaps easier, fire the search term to NP on a ‘base’ call and use a pass-through template to create a correct query on the server and then load it via a server-side re-direct (IOW, you never see the page figuring out the query). Remember too that Text Block fields can only ever match a single work and not phrases.

The v10.2 NP manual is … wrong; it describes the old functionality. Can this be fixed for the next release? (Also, all the previously reported typos/errors in the NP API section?)


#10

I should clarify in case there’s any confusion. The ‘Quick Find’ or ‘Quick Search’ box in the version 10 templates searches only on keywords with those added benefits I mentioned. It’s not actually using though the ‘QuickFind’ command but doing a ‘Find’ command on the keywords field. the ‘QuickFind’ command is hard-coded to search on filename, keywords and description and can’t be changed from that behaviour, but is therefore unchanged from previous versions. It’s the ‘search box’ functionality that has been modified in the templates with version 10.


#11

Thanks guys, I got it working. The find function seems to only allow one human input type with the rest coming from predefined values in the separate clauses, obviously this wasn’t what I wanted as I wanted the users input to search across all specified fields and not have to hard code the additional clause values for the user. My solution was to use some simple JavaScript on a keyup stroke to populate these other hidden clause values. Works a treat.

Thanks once again.

Scott.