Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional indexing or following #12

Open
tahagh opened this issue Jan 9, 2015 · 4 comments
Open

Conditional indexing or following #12

tahagh opened this issue Jan 9, 2015 · 4 comments

Comments

@tahagh
Copy link
Member

tahagh commented Jan 9, 2015

Sometimes user wants to index a document when some value is present or absent in the page. The typical example is robots meta tag. The same is also hold for following the outlinks. This plugin can support this feature by having two predefined fields index and follow and based on their values it decides to index or follow the document or not. Something like this might be do the job:

<document>
  <extract-to field="robots">
    <normalize normalizer="lower">
        <first skipEmptyItems="true">
          <attribute name="content">
            <expr value="meta[name=robots]" />
          </attribute>
        </first>
    </normalize>
  </extract-to>
  <extract-to field="index">
    <not>
        <matches pattern="noindex">
            <field-value field="robots" />
        </matches>
    </not>
  </extract-to>
  <extract-to field="follow">
    <not>
        <matches pattern="nofollow">
            <field-value field="robots" />
        </matches>
    </not>
  </extract-to>
</document>
@raisindetre
Copy link

Fantastic plug-in - thanks! This conditional indexing functionality is what I'm after but am not clear whether it is currently implemented or dev notes for future development? Some of the tags used in the example are invalid against the current schema for my source - "not", "normalize" etc. I can't see any recent commits since I downloaded which alter the schema also.

@tahagh
Copy link
Member Author

tahagh commented Jan 21, 2015

unfortunately it's not implemented yet, just an idea for the future.
On Jan 21, 2015 12:37 AM, "raisindetre" [email protected] wrote:

Fantastic plug-in - thanks! This conditional indexing functionality is
what I'm after but am not clear whether it is currently implemented or dev
notes for future development? Some of the tags used in the example are
invalid against the current schema for my source - "not", "normalize" etc.
I can't see any recent commits since I downloaded which alter the schema
also.

Reply to this email directly or view it on GitHub
#12 (comment)
.

@AndraDenis
Copy link

Did you manage to implement the conditional indexing?

@tahagh
Copy link
Member Author

tahagh commented Aug 14, 2015 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants