Skip to main content
 
 
 
IN THIS SECTION
3 posts
gmmf
Last seen: 05/19/2023 - 02:42
Joined: 11/29/2021 - 09:57
Problem with query

Im having trouble building complex queries. I have the following query:

{

"q": {"_or":[{"_text_all":{"patent_title":"cancer"}},{"_text_all":{"patent_abstract":"cancer"}}]},

"o": {"page":1,"per_page":10},

"f": ["patent_id","patent_number","patent_date", "patent_title"]

}

 

Which returns

{

"patents": [

{

"patent_id": "10000443",

"patent_number": "10000443",

"patent_date": "2018-06-19",

"patent_title": "Compositions and methods for glucose transport inhibition"

}, ...

"total_patent_count": 32107

}

 

Now, If I do the following query, I would expect to still have results, albeit a lot less than the 32 K, since the first patent_date in the results is 2018-06-19.

{

"q": {

"_and": [

{"_or":[{"_text_all":{"patent_title":"cancer"}},{"_text_all":{"patent_abstract":"cancer"}}]},

{"_gte":{"patent_date":"2018-01-01"}}

]

},

"o": {"page":1,"per_page":10},

"f": ["patent_id","patent_number","patent_date", "patent_title"]

}

In my mind, this query should fetch all the results that have the word cancer in the title or the abstract AND their patent_date is greater than 2018-01-01. But the result Im getting is 

{

"patents": null,

"count": 0,

"total_patent_count": 0

}

gspanglett
Last seen: 01/14/2024 - 18:29
Joined: 10/09/2021 - 17:08
I am experiencing query problems as well

Hi,

I am also having strange query results.  This link works:

https://api.patentsview.org/patents/query?q={"_and":[{"_gte":{"patent_date":"2007-01-04"}},{"_lte":{"patent_date":"2007-12-31"}}]}

This one does not (returns 0 patent count):

https://api.patentsview.org/patents/query?q={"_and":[{"_gte":{"patent_date":"2008-01-04"}},{"_lte":{"patent_date":"2008-12-31"}}]}

 

I am also having problems accessing CPC subgroups.  I have several queries that were previously working and are now broken, returning no results.

 

Has something changed?

 

PVTeam
Role: moderator
Last seen: 04/26/2024 - 10:39
Joined: 10/17/2017 - 10:47
API Resolved

Hello! This issue is now resolved with the API. Thank you for your patience while we found the error and made a fix. 

Best,

PVTeam