0.0
No commit activity in last 3 years
No release in over 3 years
polyrex-search
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

#Introducing the Polyrex Search gem

The Polyrex Search gem is an experiment on how keywords can be stored and searched using a Polyrex document.

require 'polyrex-search'

ps = PolyrexSearch.new 'polyrex_search.xml'
a = ps.search 'bubble time'

#=> [["spacebubble.com", 2],["hubbabubba.com", 1]]

file: polyrex_search.xml

<?xml version='1.0' encoding='UTF-8'?>
<words>
  <summary>
    <recordx_type>polyrex</recordx_type><schema>words/key[word]/location[url]</schema></summary>
  <records>
    <key id='1'>
      <summary><word>bubble</word></summary>
      <records>
        <location id='2'><summary><url>spacebubble.com</url></summary><records></records></location>
        <location id='3'><summary><url>hubbabubba.com</url></summary><records></records></location>
      </records>
    </key>
    <key id='2'>
      <summary><word>time</word></summary>
      <records>
        <location id='2'><summary><url>spacebubble.com</url></summary><records></records></location>
      </records>
    </key>
  </records>
</words>