First time here? Check out the FAQ!

Whitespace in query searches for property

  • retag add tags

For some reason when I search the database for city’s or other fields that contain multiple strings eg; San Francisco, Pleasant Hill, etc I always get a “no records found”, while searching for the zip codes will list those cities. I have an idea that it could have something to do with the way it handles whitespace characters, does anybody know what the solution is for this?

I'm using rets-npm client with Node,

Adeola13's avatar
asked 2019-10-14 19:54:32 -0500
edit flag offensive 0 remove flag close merge delete


What RETS URL and Login name (NO PASSWORDS).

bwolven's avatar bwolven (2019-10-15 06:25:29 -0500) edit
add a comment see more comments

1 Answer


You need to look at the metadata for the field to determine how to search the field.
If the field is a lookup then you would use the "Value" from the associated lookup in the search.

For example for MAXEBRDI field L_City:
<longvalue>SAN FRANCISCO</longvalue>

The query would be: (L_City=SANFRCISCO)
You can also try wildcard on character type fields like: SANF*

Searching is by the value returned when searching and returning COMPACT format data.
COMPACT-DECODED would return the "LongValue" from the lookup.

bwolven's avatar
answered 2019-10-15 11:42:08 -0500
edit flag offensive 0 remove flag delete link


Ahh I see thank you so much! That worked, so should I"m trying to build a search engine, is the best route to just create a lookup table for all the city's and to use that for my query's or is there actually a way to query based on the long value?

Adeola13's avatar Adeola13 (2019-10-15 12:08:44 -0500) edit

For lookup type fields, the search is always based on the lookup Value.
The Short and Long values are really more for display purposes in a client.
In some fields it may just be a numeric value that translates to text using the lookup.

bwolven's avatar bwolven (2019-10-15 13:15:59 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer