Query Format

Discussion in 'A-Parser Support Forum' started by DeathStapler, Mar 5, 2014.

  1. DeathStapler

    DeathStapler A-Parser Pro License
    A-Parser Pro

    Joined:
    Mar 1, 2014
    Messages:
    9
    Likes Received:
    1
    Is there a way that you could have a Query Format similar:

    {query} {az:a:z}|{az:a:z} {query}|{each:buy,discount,closeout} {query}

    So if your query was "fishing pole" I would get:

    fishing pole a
    fishing pole b
    fishing pole c
    ...
    a fishing pole
    b fishing pole
    c fishing pole
    ...
    buy fishing pole
    discount fishing pole
    closeout fishing pole
     
  2. DeathStapler

    DeathStapler A-Parser Pro License
    A-Parser Pro

    Joined:
    Mar 1, 2014
    Messages:
    9
    Likes Received:
    1
    I tried what I thought would work. I created two parsers using:



    Parser 1: SE::Google::Suggest
    Override Option -> Query Format = {query} {az:a:z}

    Parser 2: SE::Google::Suggest
    Override Option -> Query Format = {az:a:z} {query}

    Result Format: parser1({preset})\nparser2({preset})\n

    These are the results:
    Code:
    fishing pole {az:a:z} - fishing pole {az:a:z}:
     
     
    {az:a:z} fishing pole - {az:a:z} fishing pole:
    
     
  3. DeathStapler

    DeathStapler A-Parser Pro License
    A-Parser Pro

    Joined:
    Mar 1, 2014
    Messages:
    9
    Likes Received:
    1
    After some testing it looks like when you use an Override Preset for a parser and select Query Format. It doesn't look like it supports macros (i.e. {az:a:z}). Is this a bug or a suppose to work like that?

    [​IMG]
     
  4. Forbidden

    Forbidden Administrator
    Staff Member A-Parser Enterprise

    Joined:
    Mar 9, 2013
    Messages:
    3,337
    Likes Received:
    1,794
    this is not a bug, you can use query macros only in all Query format field

    possibility for adding multiple queries formats are planned: http://a-parser.com/threads/332/
     
  5. DeathStapler

    DeathStapler A-Parser Pro License
    A-Parser Pro

    Joined:
    Mar 1, 2014
    Messages:
    9
    Likes Received:
    1
    Thanks. I look forward to this possibly becoming a feature.
     

Share This Page