Re: Writing an index with a linked document

2023-11-12 Thread TDAS
Should I be able to specify that using nano for js? This doesn’t seem to work: let response = await db.search('search', 'full', { q: queryText, include_fields: ['createdDate', 'modifiedDate'] }) > On 12 Nov 2023, at 19:16, Robert Newson wrote: > >

Re: Writing an index with a linked document

2023-11-12 Thread Robert Newson
https://docs.couchdb.org/en/stable/api/ddoc/search.html#get--db-_design-ddoc-_search-index You might mean ?include_fields=["createdDate"] ? B. > On 12 Nov 2023, at 19:12, TDAS wrote: > > …thinking further on this, can I return a number of fields with the index > that aren’t searched? EG if I

Re: Writing an index with a linked document

2023-11-12 Thread TDAS
…thinking further on this, can I return a number of fields with the index that aren’t searched? EG if I have a ‘doc.createdDate’, how can I just return that with the data? > On 12 Nov 2023, at 18:19, TDAS wrote: > > Basically, I was hoping that I could have the search query return the name of

Re: Writing an index with a linked document

2023-11-12 Thread TDAS
Basically, I was hoping that I could have the search query return the name of the person linked to that document. Just to save doing further queries to convert a list of IDs to users. > On 12 Nov 2023, at 17:24, Robert Newson wrote: > > chatgpt makes everything up. :) > > You can't fetch

Re: Writing an index with a linked document

2023-11-12 Thread Robert Newson
chatgpt makes everything up. :) You can't fetch another document during the indexing callbacks. Perhaps explain what you're trying to achieve? \b. > On 11 Nov 2023, at 23:54, TDAS wrote: > > getDoc doesn’t exist? Did chatgpt just make that up?! Man… > > Is there an alternative? > >> On 11