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

  • Home
  • SEARCH
  • 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 8174209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:23:34+00:00 2026-06-06T22:23:34+00:00

Struggling to get any list function to work. I’ve been fine with _show and

  • 0

Struggling to get any list function to work. I’ve been fine with _show and _view functions, but lists don’t seem to be working, or I have misunderstood what to do! (I’ll admit to needing an idiot’s guide!)

My design document looks like:

{
   "_id": "_design/lists",
   "_rev": "3-d22225b4a28a6ca11484723c3a37201b",
   "language": "javascript",
   "views": {
       "variants": {
           "map": "function(doc) { emit(doc.var, doc.number_of_results); }"
       }
   },
   "lists": {
       "results": "function(head, req) { var row; while(row = getRow()) {send(row.value);}}"
   }
}

When I enter http://localhost:5984/mydb/_design/lists/_view/variants I get a list of variant names, like:

...{"id":"f050ad9b9f725443cb8c4071f40583b","key":"rs1013940","value":19008},
{"id":"f050ad9b9f725443cb8c4071f40daff","key":"rs1013940","value":19008},
{"id":"f050ad9b9f725443cb8c4071f40b985","key":"rs1021188","value":10197}...

but when I enter http://localhost:5984/mydb/_design/lists/_list/results I get:

{"error":"list_error","reason":"Invalid path."}

Does anyone know what I’m doing wrong? I’ve tried everything I can think of and swapping the function for one from any of the online tutorials.

I’m using CouchDB version 1.0.1 on Ubuntu 12.04

Many thanks, hope someone can help!

  • 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-06-06T22:23:39+00:00Added an answer on June 6, 2026 at 10:23 pm

    You need to include both a view name as well as a list name in your URL:

    http://localhost:5984/:db/_design/:ddoc/_list/:list/:view

    which in your case translates to:

    http://localhost:5984/mydb/_design/lists/_list/results/variants

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

Sidebar

Related Questions

I'm a js/jquery noob and have been struggling to get an anonymous function to
I am struggling to get my head around how to scale any sort of
I am struggling to get a subsonic select query to work, I am writing
I've been struggling to get a Java program to connect to MS SQL Server,
Ok so i've been struggling to get my head around this for a few
Im learning javascript, and I am struggling to get my case statement to work.
I've been struggling for quite a while to get this feature working: I want
I'm trying to get South to work - it worked fine on my PC,
I've been struggling through SO and the Mule forums but can't find a solution
Ive been struggling to get an alert dialog to pop up when the user

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.