Posts Tagged ‘search’

Query support for media without tags, categories or geo tags

November 9th, 2012 Comments off

No Tags

Recently the query was improved to support media queries which have not tag, category, location or geo tag assigned. A special filter value was introduced: none. Use the query filter in the explorer and enter tag:none to query all untagged photos. The none value works with search terms tag, category, sublocation, city, state, country, location, and geo. Further you can query media with geo information via geo:any

To see the demo visit the demo photo gallery with explorer/view/tag:none.

Further examples are:

Simple Filter with any:

Explorers filter input was also improved. In the older version the user had to wait for autocompletion of search term to activate the search filter. For example, if you searched for food you had to wait until phTagr suggested the search term tag:food. Inpatient situations (or inpatient users) where just hitting enter after entering the word food. The single word was not accepted as filter term and was rejected.

Now phTagr detects such inputs and uses the filter term any: In the previous example phTagr adds the search term any:food and returns hits in tags, categories, or locations. I’m starting to love this function and quick filter interaction!

Try explorer/view/any:debug at the demo photo gallery.

Quick Search with similar:

The third change was applied to the quick search bar in the top right corner. The quick search opens the same search view as other filtered views. Further phTagr searches similar words to the given input with the new search term similar: So if you input flower, phTagr will search similar meta data by similar:flower and will also return media with power tags. Isn’t it great!?

Just play around with explorer/view/similar:leche at the demo photo gallery.

Ah. And one more thing: The rotation has now an reset action. Wrong rotated media can be easily reset to standard orientation.

Happy tagging and searching!

Faster and Better Search Support

November 3rd, 2012 Comments off

Just a short update! The free image gallery phtagr got some awesome changes regarding the media searches. The most exciting feature is the support of inclusion, optional and exclusion search terms.

As usual for the search /tag:flower/tag:tree/category:nature/location:-germany the terms flower, tree, and nature are required (AND operation). The location must not have germany.

If you change the term category:nature to category:+nature the search becomes different. For /tag:flower/tag:tree/category:+nature/location:-germany the terms flower and tree become optional and do not need to match. The category nature is now required and the location must not have germany. Therefore, the plus sign changes the search term from optional to required. The result is ordered by the hit count of the search terms. Media with tag flower and tree are higher ranked as media with only a flower tag. Media without tags flower and tree are shown at least.

To get an optional search you can use /tag:flower/tag:tree/category:nature/location:-germany/operand:OR and at least one of the terms flower, tree, and nature must exist while germany is excluded.

With this change you can query your media set faster and easy to the desired sub set.

The second great change is a database schema change. Previously, phtagr used for tags, categories and locations two tables each (e.g. one table to hold the tag name and one to store the tag assignment to images). The sql query building was complex and slow to support inclusion and exclusion of search terms. Now these 6 tables are unified to two tables and simplifies the query building and reduced the execution time.

If you upgrade, open phtagr/setup in your browser to trigger the automatic database upgrade (and it does not hurt to keep a database backup before upgrading). Further, depending on your size of phtagr installation, this database migration might consume some time and memory. Some limit adaptions need to be done to php.ini if the upgrade does not work in the first run. I needed to increase my memory limit from 128M to 256M (memory_limit = 256M) in my /etc/php5/apache2/php.ini to migrate 2643 fields with 90203 media assignment of 20725 photos.

[update 2012-11-09]The query speed for search term exclusion was recently optimized to handle exclusions in seconds for 20k media instead of several seconds. The exclusion is done via a NOT IN () in WHERE condition block with a subquery.[/update]

The newest tarball could be downloaded from sourceforge as usual. Or try the demo gallery with location:+italy/category:vacation/location:lecce/category:-screenshots!

Categories: info Tags: