question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Search Api not working properly

See original GitHub issue

I’ve just tried to use search feature and it seems it doesn’t work as expected for the object records. According to the docs :

Let’s say the field’s value for a cell is an object: { … , fullName: {firstName: ‘some-first-name’, lastName: ‘some-last-name’} }, Its getValue function for displaying the first and last name as a full name, would be: getValue: ({value, column}) => value.firstName + ’ ’ + value.lastName The returned value will be used for searching, sorting etc…

This seem to Work half way. I have this object:

{
	name: 'abc'
	number: 123
	property: {
		abc: 'aaaa'
	}
}
	  // my column definition for the property.abc getter
   	  getProperty = (val) => val.abc
	   field: 'property',
      getValue: ({ value }) => getProperty(value),

Search will work fine for the name number values but for the property.abc it will work only for the first 2 characters and then it doesn’t work further unless I flatten the object so all properties are on one level and the value is accessed via direct property name instead of getValue function

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
NadavShaarcommented, Nov 26, 2022

Fixed in V1.1.2

0reactions
NadavShaarcommented, Nov 25, 2022

Thanks, will look into it…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not working properly with search api [#2441891] | Drupal.org
This module is working fine with core search and normal node list view. But it is not returning results properly with search api...
Read more >
Elasticsearch multi search api is not working properly
Im facing the below issue while using multi search api. API: https://elasticrunningserver:9200/myindex/_msearch. Payload: { } {"query" : {"match ...
Read more >
Search API: Understanding and Using - Documentation
Understanding the Search API. The Search API is an XQuery library that combines searching, search parsing, search grammar, faceting, snippeting, search term ...
Read more >
Contact search api not return any results - HubSpot Community
Solved: I am trying to search contacts using the contact api search endpoint. ... I just can't seem to make the search endpoint...
Read more >
Problem with Search API (part of Graph API) when making ...
Problem with Search API (part of Graph API) when making requests with my application (it asks for Region) - Microsoft Q&A.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found