Search system participation

Specifications

Objective

The goal is to create a special, custom made script (created by your company) that returns stock information about the electronic components in question, for example:
  • We are interested in a component named max232. Our server send a query to your script containing the name of the component requested and waits for a reply.
  • Your script returns a list of components from your stocks, that contains the query string in its name and availability information for each component (In stock, Not in stock or Available for preorder).

Implementation

Our server queries your server over HTTP, requests the URL of your script and transfers the query with the string to search as a parameter using one of the possible methods (GET or POST).
Your script returns stock information in a XML format that has the following fields:
  • <data></data> — Root field.
  • <line></line> — Information regarding a single item.
    • <mfg></mfg> — Manufacturer (for example: Maxim).
    • <part></part> — Name of the component (for example: max232cpe).
    • <note></note> — Description (for example: interface RS-232 120Kbit/s Up=5Â 0...+70°C)
    • <img></img> — Link to an image (photo) or additional description.
    • <pdf></pdf> — Link to technical documentation.
    • <cur></cur> — Currency (USD, RUR, EUR).
    • <p1></p1> — Retail price.
    • <p2></p2> — Small quantities price.
    • <p3></p3> — Wholesale price.
    • <stock></stock> — stock status, the following fields are availble:
      • yes — Available in stock (the instock is not used).
      • Integer — Indicates the number of items in stock (the instock is not used).
      • 0 — Not in stock (the instock is not used).
      • Stock information in the form of a range — for example: «<100» (instock tag must contain 1 as a value).
      • Indication of shipment time — for example: USA, 3-4 weeks (the instock must contain 0 as a value).
      • Forbidden field values:
        «Call»
        «Order» or «Query»
        «In stock»
        «Available»
        and others.
    • <instock></instock> — Additional information about stock availability (1 — in stock, 0 — not in stock). Used in the described above situations.

Notes:

  • The tags <data>, <line>, <part> and, in some cases, <instock> are obligatory.
  • The search results must not contain more than 20 lines of text.
  • All prices must include taxes, floating point symbol is "." (dot).
  • If the currency is not indicated, it is assumed that the currency will be US Dollars.
  • If the stock status is not indicated, it is assumed that the stock contains no items.
  • The search script has to work as fast as possible (less than 1 second), otherwise our server wont be able to get all information in time and display it in the search results.
  • The server has to be ready to serve several tens of thousands queries a day.

Requirements issued results

  • Search results must contain request string.
    For example: if request string is «max232», then each search result string must contain «max232».
  • If the request is composed of words separated by spaces (or symbols-separators), then search result string must contain all requested words.
    Symbols-separators: « », «\t» (tab), «\n», «,» «;» «*» «?»
    For example: if request string is «max 232» or «max,232», then each search result string must contain «max» and «232».
  • When searching, its permitted to remove some of the special symbols: «_», «-», «.», «/», «\», «|», «#», «~», «+», «^», «@», «%», «(», «)».
    For example: if request string is «max-232», then the withdrawal is permitted only on the search results for «max-232» or «max232». Not allowed of the search results only at the request «max» or «232».
  • In the resulting strings allowed the requested withdrawal line, separated by spaces (or symbols-separators).
    For example: if request string is «max232», then the «somethingMAX 232pc» permitted in search results.

Code example according to the specifications

<?xml version="1.0" encoding="UTF-8"?>
<data>
 <line>
    <mfg>MAXIM</mfg>
    <part>MAX232ECSE</part>
    <note> Driver RS-232, 2Dr/2Re, 200 Kbit, Un = 5Â, -40:+85; case SO16 150</note>
    <cur>EUR</cur>
    <p1>4.2610</p1>
    <stock>20</stock>
  </line>
  <line>
    <mfg>MAXIM</mfg>
    <part>MAX232EPE</part>
    <pdf>http://www.site.ru/pdf/MAX/MAX220_M.pdf</pdf>
    <p1>3.1</p1>
  </line>
  <line>
    <mfg>MAXIM</mfg>
    <part>MAX232</part>
    <stock><100</stock>
    <instock>1</instock>
  </line>
  <line>
    <mfg>MAXIM</mfg>
    <part>MAX232ACUE</part>
    <stock>3-4 weeks</stock>
    <instock>0</instock>
  </line>
</data>
The code above will be parsed into the following text:

ManufacturerPart number and DescriptionRetailSmall qty.WholesaleStock
MAXIMMAX232ECSE
Driver RS-232, 2Dr/2Re, 200 Kbit, Un = 5Â, -40:+85; case SO16 150
4.2610 €20
MAXIMMAX232EPE
PDF   
3.1 $
MAXIMMAX232<100
MAXIMMAX232ACUE3-4 weeks
Rambler's Top100
© 2002—2012 «AtLight»
Administration: +7 (812) 334-85-22, admin@efind.ru
Participation in search system · Analytics · Ðóññêàÿ âåðñèÿ