For the complete experience, please enable JavaScript in your browser. Thank you!

  • Creative Cloud
  • Photoshop
  • Illustrator
  • InDesign
  • Premiere Pro
  • After Effects
  • Lightroom
  • See all
  • See plans for: businesses photographers students
  • Document Cloud
  • Acrobat DC
  • eSign
  • Stock
  • Elements
  • Marketing Cloud
  • Analytics
  • Audience Manager
  • Campaign
  • Experience Manager
  • Media Optimizer
  • Target
  • See all
  • Acrobat Reader DC
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player
  • All products
  • Creative Cloud
  • Individuals
  • Photographers
  • Students and Teachers
  • Business
  • Schools and Universities
  • Marketing Cloud
  • Document Cloud
  • Stock
  • Elements
  • All products
  • Get Support
    Find answers quickly. Contact us if you need to.
    Start now >
  • Learn the apps
    Get started or learn new ways to work.
    Learn now >
  • Ask the community
    Post questions and get answers from experts.
    Start now >
    • About Us
    • Careers At Adobe
    • Investor Relations
    • Privacy  |  Security
    • Corporate Responsibility
    • Customer Showcase
    • Events
    • Contact Us
News
    • 3/22/2016
      Adobe Summit 2016: Are You An Experience Business?
    • 3/22/2016
      Adobe Announces Cross-Device Co-op to Enable People-Based Marketing
    • 3/22/2016
      Adobe and comScore Advance Digital TV and Ad Measurement
    • 3/22/2016
      Adobe Marketing Cloud Redefines TV Experience
Developing Applications Help / 

Solr search examples

Adobe Community Help


Applies to

  • ColdFusion

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

The following examples show the search syntax used while performing search operations using Solr:

  • Single word search: The following example shows how to search for a single word in a collection:

    <cfsearch name="qsearch1" collection="solr_complex" criteria="Graphics">

  • Multiple word search: The following example shows how to search a document or query having words "ColdFusion" and "Green" in it:

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria="+Green +Coldfusion">

  • Search with at least one word: The following example shows how search for at least "Coldfusion" OR (Green OR Blue):

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria=" +Coldfusion Green Blue">

  • Search for one word, but not the other: The following example shows how to search for "Green" but NOT "Coldfusion":

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria=" -Coldfusion +Green">

  • Fuzzy search: The following example shows how to search words like roam, roams, foam, foams:

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria=" roam~">

    Alternate way to perform a fuzzy search for "roam":

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria="roam~">

    Searching for higher similarity with roam:

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria=" roam~0.8" >

  • Wildcard search: The following syntax searches for 'test', 'text', 'teat', and so on:

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria=" te?t">

    This example searches for 'test', 'text', 'teeeeeext', and 'texyzt':

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria=" te*t">

Note: You cannot use a * or question mark (?) symbol as the first character of a search.

  • Proximity search: To search for "apache" and "jakarta" within five words of each other in a document, use the following search:

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria="jakarta apache" ~10>

  • Range Search: Following searches all documents with title between 'fuzzy1.txt' to 'text1.txt':

    <cfsearch name="qsearch"
    collection="solr_srch"
    criteria="title:fuzzy1.txt TO text1.txt">

    To search a document whose modification date is between a given range:

    <cfsearch name="qsearch"
    collection="solr_srch"
    criteia="modified:20080101 TO 20500101">

    These
    ranges are inclusive of start and end terms. To exclude them, use
    curly brackets{} instead.

  • Field search: To search any document whose title contains "fuzzy1.txt"

    <cfsearch name="qsearch"
    collection="solr_srch"
    criteria="title:fuzzy1.txt">

    Searching for document that contains title as 'fuzzy1.txt' OR 'fuzzy2.txt':

    <cfsearch name="qsearch"
    collection="solr_srch"
    criteria="title:fuzzy?.txt">

    The following syntax can be used to perform the same search:

    <cfsearch name="qsearch"
    collection="solr_srch"
    criteria= ""title:fuzzy1.txt"" OR ""title:fuzzy2.txt"">

    Alternatively, you can search using the following syntax:

    <cfsearch name="qsearch"
    collection="solr_srch"
    criteria="title:(test* +fuzzy1*)">

  • String search:

    <cfsearch name="qsearch1"
    collection="solr_complex"
    criteria="Cold Fusiongava" OR "Internet Tools">

  • Searching synonyms: There are two ways to search documents that have synonymous words like 'MB', 'megabyte', 'gig', and so on:
    1. If collection is not yet created, go to: <cf_home>/solr/multicore/template/conf/synonyms.txt This file contains some default mappings such as 'GB, gig, gigabyte, gigabytes'. Define your synonym mappings in the next row.
    2. If you want to add a synonym mapping for a collection that is already created, go to <collection_location>/conf/synonyms.txt and define your mapping.Restart the Solr server after defining mapping.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Choose your region United States (Change)   Products   Downloads   Learn & Support   Company
Choose your region Close

Americas

Europe, Middle East and Africa

Asia Pacific

  • Brasil
  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Cyprus - English
  • Česká republika
  • Danmark
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Greece - English
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • Malta - English
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • Southeast Asia (Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam) - English
  • 台灣

Commonwealth of Independent States

  • Includes Armenia, Azerbaijan, Belarus, Georgia, Moldova, Kazakhstan, Kyrgyzstan, Tajikistan, Turkmenistan, Ukraine, Uzbekistan

Copyright © 2016 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

AdChoices