Created on 27 September 2023, about 1 year ago

Problem/Motivation

While this module looks useful, I haven't quite got it to work.
I've tried various different URL 'patterns' but none produce the output I'd like.

Steps to reproduce

I has assumed that a call to the endpoint /jsonapi/index/[my_index] would return the items as they are 'indexed' - returning only the indexed fields.
Instead it seems the 'full' Drupal node is being returned.

type	"node--brand_basics"
id	"f4dc3e58-fcea-41ae-8da3-b0263b09328d"
attributes	
drupal_internal__nid	5
drupal_internal__vid	30
langcode	"en"
revision_timestamp	"2023-09-27T09:27:04+00:00"
revision_log	null
status	true
title	"sample Basics"
created	"2023-09-27T09:26:43+00:00"
changed	"2023-09-27T09:27:04+00:00"
promote	false
sticky	false
default_langcode	true
revision_translation_affected	true
metatag	null
path	
alias	null
pid	null
langcode	"en"
field_teaser_snippet	"snippet"

I tried 'limiting' the fields with a call like
jsonapi/index/main_solr?fields[node--hot_topics]=title,field_teaser_image
and while this _does_ limit the responses, it seems I can only limit by Drupal fields, not by 'indexed' fields.

I'm also unsure how to add a sort parameter to the query.

Proposed resolution

Some example URL calls would be helpful.
I'll post some here if I work it out

Remaining tasks

Figure out sample URLs

User interface changes

n/a

API changes

n/a

Data model changes

n/a

💬 Support request
Status

Active

Version

1.0

Component

Documentation

Created by

🇮🇪Ireland alanburke

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @alanburke
  • 🇮🇪Ireland alanburke

    Sorting is straightforward
    /jsonapi/index/main_solr?filter[fulltext]=query_term&sort=nid
    will let you sort by nid
    and
    /jsonapi/index/main_solr?filter[fulltext]=basic&sort=-nid
    will let you reverse that sort

Production build 0.71.5 2024