Giter Club home page Giter Club logo

Comments (1)

kelockhart avatar kelockhart commented on August 20, 2024

Hi Rudra,
The best way to handle this would be to use an if statement when building your query string. Something like this (assuming you're using Python):

query = 'first_author:' + first_author + ' year:'+ year
if volume:
query += ' volume:' + volume
if page:
query += ' page:' + page

There are potentially some other ways you could write this, but we're limited by the fact that if a record doesn't have a volume/page, then it doesn't usually have that field even associated with the record in the database (so you couldn't just do a wildcard search on the volume/page, for example). And if you're getting into that level of detail anyway, you might as well just modify the query string based on the fields you do have, as I've outlined above.

Hope this helps!

from adsabs-dev-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.