Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4254030
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:01:38+00:00 2026-05-21T05:01:38+00:00

CouchDB gives an opportunity to search values from startkey, for exact key-value pair etc

  • 0

CouchDB gives an opportunity to search values from startkey, for exact key-value pair etc
But is there any way to search for substring in specified field?

The problem is like this. Our news database consists of about 40,000 news documents. Say, they have title, content and url fields. We want to find news documents which have “restaurant” in their title. Is there any way to do it?

View Collation wiki page tells nothing 🙁 And it seems strange to me that there’s no tool to handle this problem and all I can to do is just parsing JSON results with Python, PHP or smth else. In MySQL it’s simply LOCATE() function..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T05:01:38+00:00Added an answer on May 21, 2026 at 5:01 am

    Be careful here. Lucene is not always the best answer.

    If your only searching one limited field and only searching for a word like restaurant then lucene which is really meant to tokenize large texts/documents can be way overkill, you can get the same effect by splitting the title.

    function(doc){
             var stringarray = doc.title.split(" ");
             for(var idx in stringarray)
             emit(stringarray[idx],doc);
    
            }
    

    Also Lucene and Couchdb do not support substring search, where the string is not in the beginning of a word.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to search by key value in Apache CouchDB? Given the sample
I need to create a CouchDB user which can only read documents from any
How does CouchDB handles conflicts while doing bi-directional replication? For example: Lets say there
CouchDB offers the ability to perform faceted search via Lucene. I would like to
In couchdb I need to filter by key and which is done like this.
Given a default pylons installation are there any examples available on the best practices
Is there a newer version of the Sofa tutorial for CouchDB ? I'm trying
I'm using couchdb as downloaded from http://couch.io/get on Mac OS X 10.6, and it
I'm considering using CouchDB for an upcoming site, but I'm a little confused as
I'm using the following jQuery code to get a JSON file from CouchDB. Function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.