Wildcard searches

Donate to this project

Development Project Status: Completed

Total cost estimate (ex-Tax): 
Due date for completion of this stage: 
Current Percentage Funded: 
Project funding: 

You can donate money to this project by entering the amount above and clicking the 'Add to cart' button. In the Checkout process you can either choose to pay now (via Bank Transfer, Cheque or Pay Pal) or you can pledge the amount by choosing the 'Pledge a payment for a Development Project' method. If you make a pledge, then when we have 100% funding commitments, you will be notified by email and you can then action your payment. Note that development will not commence until all funds are received.

Project description: 

By default, OpenVPMS supports starts-with matching when performing queries, i.e. it will return all results that start with the entered text.

To match everything containing the entered text, the user must remember to prefix it with a wildcard (* or %).

In general, starts-with queries are faster than contains queries as they can make better use of database indexes.

This project will make contains matching the default for queries that won't adversely affect performance.

This will apply to the following archetypes:

  • products
  • suppliers
  • organisational archetypes  (i.e. everything found in Administration - Organisation)
  • document templates
  • lookups
  • types (i.e. everything found in Administration - Types)
  • HL7 services and connectors (i.e. everything in Administration - HL7)
  • archetype descriptors (i.e. everything in Administration - Archetypes)
  • user groups
  • users
  • roles


The contains search will be enabled by configuring a flag within the QueryFactory.properties file for each of the relevant archetypes e.g.:

product.*       org.openvpms.web.component.im.product.ProductQuery,contains=true

This will default to false if not specified.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Wildcard searches

what a bargin! We will put in 50%! Anyone else.... :)

Re: Wildcard searches


Ok, we will fund this completely. Makes life so much easier with macros and will likewise improve efficiency when searching Venom codes and pretty much elsewhere.

While we would love this to be default across the system I understand performance could take a hit.


- How much by? Will it be possible for patient/customer searches user configurable? I.e. we can turn it on and if it becomes too much of an issue then turn it off?



Re: Wildcard searches

Thanks very much for generously supporting this project Adrian. It is now fully funded and everyone will be able to share this new feature when released.


Re: Wildcard searches

'Contains' searches require a scan of every record in the database of the type you are interested in. If you have a million customers, it will look at each of them. Response times will decrease as you add more records.

You will be able to turn the contains searches on and off, but not in a convenient manner as they are configured via a properties file. The server needs to be restarted for the changes to take effect.


Syndicate content