إدارة Cloud Firestore باستخدام "وحدة تحكُّم Firebase"
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يمكنك تنفيذ الإجراءات التالية على Cloud Firestore عند استخدام
وحدة تحكّم Firebase:
عرض البيانات وإضافتها وتعديلها وحذفها
إنشاء Cloud Firestore Security Rules وتعديله
إدارة الفهارس
مراقبة الاستخدام
عرض البيانات
يمكنك عرض جميع بيانات Cloud Firestore في وحدة تحكّم Firebase. من علامة التبويب Cloud Firestoreالبيانات،
انقر على مستند أو مجموعة لفتح البيانات المتداخلة ضمن هذا العنصر.
فتح مسار معيّن
لفتح مستند أو مجموعة في مسار معيّن، استخدِم زر تعديل المسارcreate:
فلترة المستندات في مجموعة
لفلترة المستندات المُدرَجة في مجموعة، استخدِم الزر فلترة القائمةfilter_list.
مستندات أصل غير متوفّرة
يمكن أن يكون المستند موجودًا حتى إذا كان أحد العناصر الرئيسية أو أكثر غير متوفّر. على سبيل المثال، يمكن أن يكون المستند في المسار
/mycoll/mydoc/mysubcoll/mysubdoc موجودًا حتى إذا لم يكن المستند الأصلي
/mycoll/mydoc موجودًا. تعرض أداة عرض البيانات Cloud Firestore مستند الأصل غير المتوفّر على النحو التالي:
في قائمة المستندات الخاصة بمجموعة، تكون معرّفات المستندات الأصلية غير المتوفّرة مائلة.
في لوحة معلومات مستند رئيسي غير متوفّر، يشير عارض البيانات إلى أنّ المستند غير متوفّر.
بيانات طلب البحث
يمكنك طلب البحث عن مستندات في علامة التبويب أداة إنشاء طلبات البحث ضمن
Cloud Firestore صفحة "البيانات".
اختَر مجموعة لطلب البحث عن مجموعة واحدة. في حقل النص، أدخِل مسارًا إلى مجموعة.
اختَر مجموعة المجموعات لطلب البحث عن جميع المجموعات التي تحمل المعرّف نفسه. في حقل مجموعة عمليات الجمع، أدخِل رقم تعريف مجموعة عمليات الجمع.
سيعرض الجدول تلقائيًا المستندات من المجموعة أو مجموعة المجموعات المحدّدة.
انقر على إضافة إلى طلب البحث لفلترة مجموعة المستندات التي تم إرجاعها. يضيف "منشئ طلبات البحث" تلقائيًا عبارة WHERE. يمكنك تعديل هذه العبارة باستخدام القوائم المنسدلة والحقول النصية أو التغيير إلى إحدى العبارات الأخرى المتاحة. لمواصلة إنشاء طلبات بحث أكثر تعقيدًا، انقر على إضافة إلى طلب البحث.
لإزالة عبارة بحث، انقر على زر الإزالة
cancel. لإزالة جميع عبارات البحث، انقر على محو.
انقر على تشغيل لاسترداد النتائج من قاعدة البيانات.
متطلبات البحث وقيوده
أثناء استخدام "أداة إنشاء طلبات البحث"، ضَع في اعتبارك المتطلبات والقيود التالية المتعلّقة بطلبات البحث.
يجب أن تكون جميع طلبات البحث متوافقة مع فهرس واحد أو أكثر. إذا لم تتمكّن قاعدة البيانات من العثور على فهرس لتلبية طلب البحث، ستعرض رسالة خطأ تتضمّن رابطًا لإنشاء الفهرس المطلوب.
يجب أن تتطابق عبارات ORDER BY مع الحقول في عبارات WHERE وأن تكون بالترتيب نفسه. يتم ترتيب النتائج تلقائيًا حسب رقم تعريف المستند. إذا كنت تفلتر حسب أي حقل آخر باستخدام أي شيء غير المساواة (==)، أضِف عبارة ORDER BY لهذا الحقل.
يجب أن تعمل جميع عبارات طلب البحث الخاصة بالنطاق (< و<= و> و>=) وعبارات طلب البحث الخاصة بـ "لا يساوي" (!= وnot-in) على فلترة الحقل نفسه.
في Cloud Firestore، يتم تخزين البيانات في مستندات وتنظيم المستندات في مجموعات. قبل البدء في إضافة البيانات، تعرَّف على المزيد حول نموذج بيانات Cloud Firestore.
يمكنك إضافة المستندات والمجموعات وتعديلها وحذفها من وحدة تحكّم Firebase. لإدارة بياناتك، افتح علامة التبويب البيانات
في قسم Cloud Firestore:
إضافة بيانات
انقر على إضافة مجموعة، ثم أدخِل اسم مجموعتك وانقر على التالي.
أدخِل رقم تعريف مستندًا معيّنًا أو انقر على رقم تعريف تلقائي، ثم أضِف حقولاً للبيانات في مستندك.
انقر على حفظ. تظهر المجموعة والمستند الجديدان في "عارض البيانات".
لإضافة المزيد من المستندات إلى المجموعة، انقر على إضافة مستند.
تعديل البيانات
انقر على مجموعة لعرض مستنداتها، ثم انقر على مستند لعرض حقوله ومجموعاته الفرعية.
انقر على حقل لتعديل قيمته. لإضافة حقول أو مجموعات فرعية إلى المستند المحدّد، انقر على إضافة حقل أو إضافة مجموعة.
حذف البيانات
لحذف مجموعة:
اختَر المجموعة التي تريد حذفها.
انقر على رمز القائمة في أعلى عمود المستندات، ثم انقر على حذف المجموعة.
لحذف مستند أو جميع حقوله، اتّبِع الخطوات التالية:
اختَر المستند الذي تريد حذفه.
انقر على رمز القائمة في أعلى عمود تفاصيل المستند. انقر على حذف المستند أو حذف حقول المستند.
يؤدي حذف مستند إلى حذف جميع البيانات المتداخلة في هذا المستند، بما في ذلك أي مجموعات فرعية. ومع ذلك، لا يؤدي حذف حقول المستند إلى حذف مجموعاته الفرعية.
لإنشاء فهارس جديدة لطلبات البحث وإدارة الفهارس الحالية من
Firebase Console، انتقِل إلى علامة التبويب
الفهارس
في قسم Cloud Firestore. مزيد من المعلومات حول إدارة الفهارس
مراقبة الاستخدام
لمراقبة استخدامك Cloud Firestore، افتح علامة التبويب Cloud Firestoreالاستخدام
في وحدة تحكّم Firebase. استخدِم لوحة البيانات لقياس معدّل استخدامك
خلال فترات زمنية مختلفة.
تاريخ التعديل الأخير: 2025-08-16 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-08-16 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["\u003cbr /\u003e\n\nYou can perform the following actions on Cloud Firestore when using the\n[Firebase console](https://console.firebase.google.com/project/_/firestore/data):\n\n- View, add, edit, and delete data.\n- Create and update Cloud Firestore Security Rules.\n- Manage indexes.\n- Monitor usage.\n\nView data\n\nYou can view all your Cloud Firestore data in the Firebase console. From\nthe Cloud Firestore\n[**Data** tab](https://console.firebase.google.com/project/_/firestore/data),\nclick on a document or collection to open the data nested within that item.\n\nOpen a specific path\n\nTo open a document or collection at a specific path, use the **Edit path**\nbutton create:\n\nFilter documents in a collection\n\nTo filter the documents listed in a collection, use the **Filter list** button\nfilter_list.\n\nNon-existent ancestor documents\n\nA document can exist even if one or more its ancestors don't\nexist. For example, the document at path\n`/mycoll/mydoc/mysubcoll/mysubdoc` can exist even if the ancestor document\n`/mycoll/mydoc` does not. The Cloud Firestore data viewer displays\nnon-existent ancestor document as follows:\n\n- In a collection's list of documents, the document IDs of non-existent ancestor documents are *italicized*.\n- In a non-existent ancestor document's information panel, the data viewer points out that the document does not exist.\n\n| **Warning:** Even though non-existent ancestor documents appear in the console, they do not appear in queries and snapshots. You must create the document to include it in query results.\n\nQuery data\n\nYou can query for documents in the ***Query builder*** tab of the\nCloud Firestore Data page.\n\n1. [Go to the Cloud Firestore Data page](//console.firebase.google.com/project/_/firestore/data)\n\n2. Click the **Query builder** tab.\n\n3. Select a [query scope](./query-data/index-overview#query_scopes).\n\n Select ***Collection*** to query a single collection. In the text field,\n enter a path to a collection.\n\n Select ***Collection group*** to query all collections with the same\n ID. In the ***Collection group*** field, enter a collection group ID.\n\n The table will automatically display documents from the specified collection\n or collection group.\n4. Click ***Add to query*** to filter the returned set of documents. By default,\n the Query Builder adds a `WHERE` clause. You can\n modify this clause using the dropdowns and text fields or change to one\n of the other available clauses. To continue building more complex\n queries, click ***Add to query***.\n\n To remove a query clause, click it's remove button\n cancel. To remove all query clauses,\n click ***Clear***.\n | **Note:** Queries must meet Cloud Firestore requirements and limitations for queries. Otherwise, the query fails and the page returns an error that describes why the query failed.\n5. Click ***Run*** to retrieve results from your database.\n\nQuery requirements and limitations\n\nAs you use the Query Builder, keep in mind the following requirements and\nlimitations for queries.\n\n- All queries must be supported by one or more indexes. If the database cannot\n find an index to support the query, it will return an error that contains a\n link to build the required index.\n\n- `ORDER BY` clauses must match the fields in the `WHERE` clauses and come in\n the same order. By default, results are ordered by document ID. If you filter\n by any other field with anything other than an equality (`==`), add an\n `ORDER BY` clause for that field.\n\n- Range (`\u003c`, `\u003c=`, `\u003e`, `\u003e=`) and not equals (`!=`, `not-in`) query clauses\n must all filter on the same field.\n\nFor additional limitations, see\n[Query limitations](./query-data/queries#query_limitations).\n\nManage data\n\nIn Cloud Firestore, you store data in documents and organize your\ndocuments into collections. Before you start adding data, learn more about the\n[Cloud Firestore data model](./data-model).\n\nYou can add, edit, and delete documents and collections from the Firebase\nconsole. To manage your data, open the [**Data** tab](https://console.firebase.google.com/project/_/firestore/data)\nin the **Cloud Firestore** section:\n| **Note:** Read, write, and delete operations performed in the console count towards your Cloud Firestore usage. Some console activities, like viewing a document containing multiple fields, may generate several operations.\n\nAdd data\n\n1. Click **Add collection** , then enter your collection name and click **Next**.\n2. Enter a specific document ID or click **Auto ID**, then add fields for the data in your document.\n3. Click **Save**. Your new collection and document appear in the data viewer.\n4. To add more documents to the collection, click **Add document**.\n\nEdit data\n\n1. Click on a collection to view its documents, then click on a document to view its fields and subcollections.\n2. Click on a field to edit its value. To add fields or subcollections to the selected document, click **Add field** or **Add collection**.\n\nDelete data\n\nTo delete a collection:\n\n1. Select the collection you want to delete.\n2. Click the menu icon at the top of the documents column, then click **Delete collection**.\n\nTo delete a document or all of its fields:\n\n1. Select the document you want to delete.\n2. Click the menu icon at the top of the document details column. Select **Delete document** or **Delete document fields**.\n\nDeleting a document deletes all of the nested data in that document, including\nany subcollections. However, deleting a document's\nfields does not delete its subcollections.\n\nTo delete a specific field in a document:\n\n1. Select the document to view its fields.\n2. Click the delete icon beside the field you want to delete.\n\nManage Cloud Firestore Security Rules\n\nTo add, edit, and delete Cloud Firestore Security Rules from the Firebase console, go to\nthe [**Rules** tab](https://console.firebase.google.com/project/_/firestore/rules)\nin the **Cloud Firestore** section. Learn\nmore about [setting up and customizing rules](./security/get-started).\n\nManage indexes\n\nTo create new indexes for your queries and manage existing indexes from the\nFirebase console, go to the\n[**Indexes** tab](https://console.firebase.google.com/project/_/firestore/indexes)\nin the **Cloud Firestore** section. Learn more about [managing indexes](./query-data/indexing).\n\nMonitor usage\n\nTo monitor your Cloud Firestore usage, open the Cloud Firestore\n[**Usage** tab](https://console.firebase.google.com/project/_/firestore/usage)\nin the Firebase Console. Use the dashboard to gauge your usage\nover different time periods."]]