0

I am wondering if it is possible to build a query string like:

fq=model:book+model:cds+model:journal+model:new_member+model:member

I want to use the below in the browser’s address bar:

//localhost:8080/search/q=son&fq=model:book+model:cds+model:journal+model:new_member+model:member

I don’t want to use the = (model=book) and & (model=book&model=cds) signs, but I need key-value pairs (model:book) and the + sign (model:book+model:cds).

Eliran Malka
  • 15,821
  • 6
  • 77
  • 100

1 Answers1

0

http_build_query from PHPJS may interest you. It does the same as PHP's http_build_query, but it has been ported to JavaScript so you can do the same thing in JS.

For your purposes, you will need to edit lines 37 and 44 to use the separators you want.

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592