navarre.ai

Slide archive

DEV024 Extend Search in Your Solutions

DevCon 2013 · 2013 · Matt Navarre · 58 slides

Slide 1: Extend Search in Your Solutions

Slide 1Extend Search in Your Solutions

  • DEV024
  • Matt Navarre
  • MSN Media
Slide 2: Business

Slide 2Business

  • Database developer since 1983
  • MSN Media, Inc. 1989
  • FBA Platinum
  • Certified in 7–12
  • FileMaker Excellence Award 2005, Sales
  • FileMaker Evangelist of the Year 2011
  • Oregon Public Health
Slide 3: Pleasure

Slide 3Pleasure

  • Portland FMPug chapter coordinator
  • Filemaker Talk Podcast - with Matt Petrowsky
  • Musician, photographer, collector, traveler, cyclist
Slide 4
Slide 5
Slide 6
Slide 7
Slide 8
Slide 9
Slide 10: Demo

Slide 10Demo

  • Where are we going with this?
  • fmSR version 4 ßeta
Slide 11: 10 Ideas

Slide 1110 Ideas

  • Study user search patterns
  • Recently viewed records
  • Single-field search
  • Result History / Linked
  • Relevance ranking
  • Preprocess
  • Iterate
  • Search multiple tables
  • Display Results
  • Candy
Slide 12: 1: Study Users

Slide 121: Study Users

Slide 13: User Search Patterns

Slide 13User Search Patterns

  • Observe Users in their natural habitat
  • Observe, ask questions
  • Shut up and watch
  • Make no assumptions
Slide 14: User Search Patterns

Slide 14User Search Patterns

  • Log user searches
  • Analyze patterns
  • Is there an 80/20 rule?
  • 90/10 rule?
  • Which tables are searched and which aren’t?
  • Discover new use cases?
  • Facilitate common searches
Slide 15: 2. Recently Viewed Records

Slide 152. Recently Viewed Records

Slide 16: Recently Viewed Records

Slide 16Recently Viewed Records

  • More like Web History than a ‘Back’ solution
  • Integrate by adding a single table
  • Track record views for all records / primary tables
  • Trigger script onRecordLoad
  • Viewing a record should not modify that record
  • Show sorted list of record views on Dashboard
Slide 17: Recently Viewed Records

Slide 17Recently Viewed Records

  • Field list:
  • UUID of record viewed
  • Text description of record viewed
  • Table Name of record viewed
  • Count of views
  • Timestamp Last Viewed
Slide 18: Demo of ‘Reuse’

Slide 18Demo of ‘Reuse’

Slide 19: 3. Single Field Search

Slide 193. Single Field Search

Slide 20: Single Field Search

Slide 20Single Field Search

  • Follow The Leaders
  • Yahoo, Excite, Lycos, Bing, InfoSeek, WebCrawler, Ask Jeeves, Alta Vista, etc.
  • All users are trained on search from a single field
  • Take advantage of the training provided by others
  • Mimic basic features
  • Consolidate results from everywhere
  • Avoid ‘no records found’
Slide 21: Single Field Search

Slide 21Single Field Search

  • Search Widget on all layouts, in same place
  • Or use Quick Find widget
  • Triggered
  • One line high
Slide 22: 4. Build Result History Link to search terms

Slide 224. Build Result History Link to search terms

Slide 23: Link Query to Click

Slide 23Link Query to Click

  • Concept: user search session
  • Concept: Short-click vs. long-click
  • Store association of search term with record viewed
  • Learns Over over time
Slide 24: Link Query to Click – Scenario

Slide 24Link Query to Click – Scenario

  • Record exists for Barbara Jones, who recently changed last name
  • User searches for ‘Barbara Peters’ and nothing is found
  • User searches again for ‘Barbara’ and gets 20 results
  • User sees list and recognizes, recalls new name
  • Clicks on ‘Barbara Jones’ record
Slide 25: Link Query to Click

Slide 25Link Query to Click

  • Add 1 table for Relevance. Fields:
  • Field for search term user types
  • Text description of record clicked
  • Table name of record clicked
  • UUID of record clicked
  • Vote Counter
Slide 26: Link Query to Click

Slide 26Link Query to Click

  • When User does a search, and quickly clicks a record
  • Store a record for the initial search term (high quality)
  • Store a record for last search term (lower quality)
  • Search against the Relevance table
  • Increment counter to score frequently used records
Slide 27: Demo of Relevance

Slide 27Demo of Relevance

Slide 28: 5. Relevance Ranking

Slide 285. Relevance Ranking

Slide 29: Relevance Ranking

Slide 29Relevance Ranking

  • Concept: Relevance by inherent quality of record
  • Concept: Relevance by similarity of search term
  • Show only high quality results .. or ..
  • Show all results, sort by relevance
Slide 30: Relevance Ranking - Example

Slide 30Relevance Ranking - Example

  • Person names are among the most common search
  • Relatively unique in any given system
  • Very commonly miss spelled
  • Haha, recursive humor
  • Soundex
  • Cast a wide net
  • Levenshtein Edit Distance
  • Function to measure similarity
Slide 31: Demo of Soundex & Levenshtein

Slide 31Demo of Soundex & Levenshtein

Slide 32: 6. Preprocess

Slide 326. Preprocess

Slide 33: Preprocess

Slide 33Preprocess

  • Before running search, determine type of data
  • Examples:
  • Integer, Dollar, Phone, Email, SSN
  • Date, Date Range, Invoice ID, Customer ID, etc.
  • Look only where that data lives
  • Yields much faster result
  • More accurate result
Slide 34: Preprocess

Slide 34Preprocess

  • Look for commands, multiple types of data, etc.
  • Quit, Menu, Recent Invoices
  • Smith 1/17/83
  • Technology+Portland -Maine
Slide 35

Slide 35

  • Let ([
  • string = $$sr Search String ;
  • integer = Int (string) ;
  • date = GetAsDate (string) ;
  • filter date = Filter (string ; "0123456789/.*") ;
  • filter date comma = Filter (string ; "0123456789/.*, ") ;
  • filter phone = Filter (string ; "0123456789.+-/() " ) ; // for US or International phone. Remove characters that don't exist in your data.
  • filter integer = Filter (string ; "0123456789" ) ;
  • filter integer comma = Filter (string ; "0123456789, " ) ;
  • filter decimal = Filter (string ; "0123456789.-$") ; // This is also true for Phone, so phone test is done first
  • filter decimal comma = Filter (string ; "0123456789, .-") ;
  • filter operator = Filter (string ; "+-/*>≥<≤") ;
  • size = Length (string) ;
  • range = PatternCount (string ;"..") ;
  • commacount = PatternCount (string ; ",") ;
  • slashcount = PatternCount (string ; "/" )
  • ] ;
  • Case (
  • filter date = string and slashcount = 2 and range = 1 ; "date range" ;
  • filter date = string and slashcount = 4 and range = 1 ; "date range" ;
  • filter date = string and slashcount = 1 and size ≤ 5 ; "date" ; // date in current year, such as 7/23
  • filter date = string and slashcount = 2 and size ≤ 10 ; "date" ; // date with year, such as 7/23/09
  • filter integer = string and GetAsNumber (string) < 99999 ; "integer" ; // could be a 5 digit zip code, though Zip is usually text to allow 98765-1234
  • filter integer = string and GetAsNumber (string) > 99999 ; "large integer" ;
  • filter decimal = string and range = 1 and PatternCount(string ; ".") < 3 ; "integer range" ;
  • filter integer comma = string and commacount ≥ 1 ; "integer list" ;
  • filter phone = string and Length ( filter integer ) = 10 ; "phone" ; // US Phone, and some international numbers
  • filter phone = string and Length ( filter integer ) = 7 ; "phone" ; // US Phone with no Area Code
  • filter phone = string and Length ( filter integer ) = 12 ; "phone" ; // International phone numbers are sometimes 12 digits
  • // filter phone = string and Length ( filter integer ) = 9 ; "ssn" ; // US Social Security number is like a phone, but with one less digit in the middle. Remove comments to use this
  • filter decimal = string ; "decimal" ; // Important to check for Decimal after phone. 7, 10, and 12 digit decimals may require special case.
  • filter decimal = string and range = 1 ; "decimal range" ;
  • filter decimal comma = string and commacount ≥ 1 ; "decimal list" ;
  • PatternCount (string ; "@" ) = 1 and PatternCount (string ; ".") ≥ 1 ; "email" ;
  • "text" // none of the above is true, so it's text
  • ) )
Slide 36: 7. Iterate

Slide 367. Iterate

Slide 37: Iterate

Slide 37Iterate

  • If at first you don’t succeed...
  • ...then skydiving is not for you
  • Never display ‘No Records Found’
  • Start with ideal search
  • Gradually broaden until results are found
  • Truncate search term (Stanislavsky to Stani)
  • Change AND searches to OR searches
  • Search in additional fields, such as Notes
Slide 38: Iterate

Slide 38Iterate

  • Use Soundex function for names
  • Use Quick Find to search all fields on a layout
  • Use table you learned about in section 4
  • Search on search terms that have previously been successful
  • Fix common date errors
  • 1/17/84 becomes 1/*/84 and 4/5/13 becomes 5/4/13
Slide 39: Iterate

Slide 39Iterate

  • Email trick
  • FileMaker can’t seach for matt@msnmedia.com unless it’s in quotes
  • Phone formatting
  • User may enter 8806288, use method to show 503-880-6288
  • Ranges, Extend and Constrain
Slide 40: Demo fmSR

Slide 40Demo fmSR

Slide 41: 8. Search Multiple Tables

Slide 418. Search Multiple Tables

Slide 42: Search Multiple Tables

Slide 42Search Multiple Tables

  • Iterate within each table, then iterate across tables
  • Trick is displaying records
  • Use repeating global fields, virtual list, or HTML
  • Track IDs from each table
  • Display results in consolidated ‘search’ table
Slide 43: 9. Display Results

Slide 439. Display Results

Slide 44: Display Results

Slide 44Display Results

  • List View
  • Only one table
  • Portal
  • One table = easy
  • Multiple tables = virtual list, etc.
  • Repeating Global Field
  • Pure FileMaker, but tricky to setup
  • WebViewer
  • Use fmp:// to link to record (hosted)
Slide 45: 10. Candy

Slide 4510. Candy

Slide 46: Candy

Slide 46Candy

  • Large static data tables
  • Tax Lots
  • Famous People
  • All of Wikipedia
  • SSNs
Slide 47: Candy

Slide 47Candy

  • Wait, SSNs?
  • Aren’t those private?
  • Really REALLY private?
Slide 48: Candy

Slide 48Candy

  • 85 Million SSNs
  • Free file from ssdmf.info
  • Contains Full Name, DOB & SSN
  • Public record
  • Caveat...
Slide 49: Candy

Slide 49Candy

Demo

Slide 50: Summery

Slide 50Summery

Slide 51: SummerySomeary

Slide 51Summery Someary

Slide 52: SummerySomearySummary

Slide 52Summery Someary Summary

Slide 53: Summary

Slide 53Summary

  • Observe Users, without prejudice
  • Think about what Google search does, and how
  • Adapt your solution, not your users
  • Test ideas to address search problems
  • Break search down to multiple phases
  • Preprocess, Iterate, Display
  • Web History
Slide 54: Summary

Slide 54Summary

  • How close can we get to Google?
  • Is 5% of the way enough?
  • Optimize!
  • For FileMaker Pro Clients on LAN & WAN
  • For FileMaker Go / Local and hosted
  • For Web / PHP
  • Future un-announced products
Slide 55: Thank You

Slide 55Thank You

Slide 56
Slide 57: Session Updates

Slide 57Session Updates

  • www.filemaker.com/devcon/speaker_updates
  • This session DID have MAJOR updates.
  • (This is also listed in your conference guide.)
Slide 58: Thank You!

Slide 58Thank You!

  • Please remember to fill out the session evaluation at:
  • www.filemaker.com/devcon/evaluations