Most search ranks by word match. Philippine law doesn't work that way.
Ask a typical search engine for the law on fraud. It returns the documents where the word "fraud" appears most often, or where the surrounding text best matches how you phrased your question. That's a reasonable strategy when you're looking for pizza places or product reviews — you probably want the page that talks about pizza the most.
For legal research, it's a recipe for wrong answers. A 2014 Bureau of Internal Revenue circular might use the word "fraud" extensively, and the wording might line up perfectly with how you asked the question. A generic search puts it on top. The real answer — Article 315 of the Revised Penal Code, the statute that actually defines and penalizes estafa — sits lower in the results, outranked by a document that cannot override it.
That's not a theoretical edge case. It's the predictable outcome when search tools treat every legal document as equal text. Philippine law doesn't work that way. It's organized as a clear hierarchy — from the Constitution at the top down to local ordinances at the bottom. Every rung below has to obey every rung above it. A good lawyer already knows which document controls. A good search tool should too.
The standard
In Philippine law, authority decides — not which document uses your words the most.
The Constitution outweighs a statute. A statute outweighs a circular. An en banc Supreme Court ruling can overturn an earlier division decision. Search results should reflect that hierarchy, or they'll surface the wrong authority.
Philippine law is a pecking order
Imagine you're asking a lawyer about tenant rights. The lawyer pulls out a stack of documents — all of them mention "tenant". One is the Civil Code. One is a Supreme Court decision from 1995. One is a Quezon City ordinance. One is a department circular from 2015.
They're not equal. A good lawyer already knows which one controls, without counting how many times each document says "tenant". Philippine law is structured as a hierarchy. Each level binds the levels below it, and every document in the system carries a weight determined by where it sits on that ladder.
Constitution
HighestThe 1987 Constitution — the highest law of the land. Every other law bends to it.
Treaty / Rule of Court
Very HighRatified treaties and the rules of court procedure. Bind every court in the country.
Statute
HighLaws passed by Congress — Republic Acts, Batas Pambansa, Commonwealth Acts, Presidential Decrees.
Supreme Court (en banc)
BindingAll 15 justices together. The Supreme Court's final word on a case — can overturn earlier rulings.
Supreme Court (division)
BindingA smaller group of justices (3 or 5) decides. Binding until the full court disagrees.
This ladder continues down through presidential issuances, specialized appellate courts (Court of Tax Appeals and Sandiganbayan), agency regulations with binding force, interpretive circulars, and local ordinances. Every level binds the levels below it.
When you search for the law on a topic, you need the document that actually decides the answer — not the one that happens to use your words the most. That means understanding this hierarchy and ranking results accordingly.
Why "best word match" is dangerous for law
A search tool that ranks by keyword density or text similarity treats a verbose circular the same as a terse statute — or worse, ranks the circular higher because it talks about the subject more. For general web search, that's fine. For finding the law that binds a Philippine court, it's structurally broken.
Search query: "Law on fraud"
❌ What keyword search surfaces first:
2014 tax bureau circular (word-heavy, low authority)
✓ What actually controls:
Article 315 of the Revised Penal Code (controlling law)
A circular cannot override the Revised Penal Code, ever. Surfacing it on top isn't just imprecise — it can send someone down the wrong path entirely.
Search query: "Tenant rights"
❌ What keyword search surfaces first:
Quezon City ordinance (exact phrase match, local reach only)
✓ What actually controls:
Civil Code provisions (national statute, binding everywhere)
Local ordinances bind only within that city. The Civil Code applies across the Philippines. Authority decides, not word match.
The failure mode is predictable: the document that happens to be verbose and on-topic outranks the document that actually has legal force. That's not an edge case you can patch with better keywords. It's the wrong ranking model for the domain.
How BatasDB ranks by legal authority
Every document in the BatasDB library of Philippine laws and cases carries its spot on the hierarchy. When you search, three signals combine to rank results: how well the wording matches your question, how much legal authority the document actually carries, and how recent it is. Authority weighs heavily — a closely matching lower-authority document can still rank above a code provision if the match is strong enough — but the system is tuned so binding sources typically surface first. Recency also plays a role: older documents are nudged down slightly in the rankings, not just used as a tiebreaker.
The effect is that binding sources typically surface first. A low-authority source like that 2014 tax circular generally loses to the controlling law when both are relevant. The Constitution, the statute on point, the binding Supreme Court ruling: those typically come first. The circular that happens to share your words stays further down — though a particularly strong match on a lower-authority document can occasionally surface above a weaker match on a higher-authority source.
BatasDB's three ranking signals: Wording match (does the document answer the question?), legal authority (where does it sit in the hierarchy?), and recency (older documents are nudged down in the rankings). Authority weighs heavily — so binding sources typically surface first — though a strong match on a lower-authority document can occasionally rank above a weaker match on a higher-authority source.
This isn't about hiding low-authority sources. Agency circulars, local ordinances, and interpretive guidance are all searchable and cited when relevant. The point is that they don't outrank the statute or Supreme Court ruling that actually governs the question. A search tool built for Philippine law should reflect the hierarchy Philippine lawyers already apply.
Not all Supreme Court rulings are equal either
The hierarchy doesn't stop at "Supreme Court decision". The Court decides cases in two configurations. Sometimes all 15 justices sit together — that's called en banc, and it's the Court's final word on a legal question. Sometimes a smaller group of 3 or 5 justices decides — that's a division.
Both are binding. But division rulings can be overturned by the full Court sitting en banc. If you cite a division ruling that was later reversed en banc, you're citing dead law. Generic search can't tell the difference — it sees two Supreme Court decisions and treats them as equally authoritative.
BatasDB tracks which configuration decided each case. En banc rulings carry more weight than division rulings on the same question, because that's how the Supreme Court's own hierarchy works. And when a case has been overruled, distinguished, or questioned by a later decision, that subsequent treatment is tracked too — so you can verify a case is still good law before you rely on it. That's what the BatasDB Case Citator is built for.
Superseded law is hidden by default, shown only for historical research
Laws get amended. Laws get repealed. Presidential Decree No. 1464, the Tariff and Customs Code of 1978, was replaced by Republic Act No. 10863 in 2016. A circular implementing the old code has no legal force anymore. But if we just deleted superseded law from the database, historical research would be impossible — and you'd have no way to trace how a provision evolved.
So we keep them, but hide them. Every document in the library is tagged as effective, amended, repealed, or superseded. Effective ones surface in normal search, ranked by authority and relevance. Superseded and repealed documents are hidden by default — they don't appear in results unless your question is phrased in past tense or otherwise signals you're asking about historical law. When they do appear for historical questions, they're flagged clearly and ranked lower, so you see them when you need them but don't accidentally rely on law that no longer applies.
The bottom line: a search tool for Philippine law should know that a statute typically outweighs a circular, an en banc ruling settles what a division left open, and a repealed provision doesn't appear in normal search results. BatasDB ranks by legal authority so binding sources typically surface first.
Authority-ranked search for a legal library, not a chatbot
BatasDB isn't a chatbot guessing from memory. It's a searchable legal library of Philippine laws, cases, and agency rules. You ask in plain English, the system searches the library, ranks results by legal authority, and summarizes only what it actually found — with numbered citations linking to the exact documents.
That library-first design is intentional. When you search "estafa cases of 2025", you get Supreme Court decisions from 2025 that discuss estafa — retrieved, ranked, and cited. Not a chatbot's best guess about what estafa law might be. The difference matters: one is verifiable legal research, the other is confident guessing.
The ranking is what makes that library useful instead of overwhelming. With a library that size, keyword search alone would bury you in marginally relevant results. Authority ranking helps surface binding sources first, because it understands that Philippine law is a hierarchy — and search results should reflect that.
Related reading
- How BatasDB ranks by legal authority — the complete hierarchy from the Constitution down to local ordinances, and why some laws win over others.
- Search Engine — Philippine legal search ranked by authority — how BatasDB search works, from your plain-English question to cited results in under 200 milliseconds.
- The hard part isn't the AI. It's the law. — the unglamorous engineering that makes Philippine legal search accurate: tracking what's been repealed, splitting along the law's own structure, and never inventing citations.
- How to verify AI legal research citations in the Philippines — why a citation you can't verify is a liability, and how to check every source before you rely on it.
Sources
- How BatasDB ranks by legal authority — the Philippine legal hierarchy and the three signals that rank search results: wording match, authority, and recency.
- BatasDB Search Engine — authority-ranked Philippine legal search, with plain-English questions and cited results from the library.
- BatasDB Case Citator — check whether a Supreme Court case is still good law, with subsequent treatment tracked from later decisions.